You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Don't know if this is meaningful or if anything is close enough to warrant being called scanLeft. Here's some possible semantics.
scanLeft(z: Z)(p: P <: Poly)
Require all the cases in P to have Z as one of their arguments.
Let the types flow just as for hlist, i.e. Z is paired with the first element, the result of that paired with the second. Since there's only one value in the coproduct then each case (except the first) must accept an Option[Accumulator].
Unlike scan for hlist scan for coproduct cannot include the initial value, otherwise it's essentially const(z) with some type.
The text was updated successfully, but these errors were encountered:
I did consider something like (2) fold, but in the end decided that it added complexity without any corresponding benefits.
Leaving that aside we'd be left with something equivalent to a fold with a two argument Poly partially applied to z ... so if I can get partial application working it'd be pretty much redundant.
Don't know if this is meaningful or if anything is close enough to warrant being called scanLeft. Here's some possible semantics.
scanLeft(z: Z)(p: P <: Poly)
Unlike scan for hlist scan for coproduct cannot include the initial value, otherwise it's essentially const(z) with some type.
The text was updated successfully, but these errors were encountered: