wheaties / AutoLifts

Automatic functional lifting, mapping and folding.
Apache License 2.0
65 stars 4 forks source link

LiftSequence #51

Closed wheaties closed 8 years ago

wheaties commented 8 years ago

Given a type class of the following

trait LiftSequence[M[_], Obj] extends DFunction[Obj]

The liftSequence operation should work on a nested type structure the following way

val foo: Foo[List[Option[Bar]]] = \\...
val bar: Foo[Option[List[Bar]]] = foo.liftSquence[List]

Follows the same general layout of the LiftFlatten type parameters. It's expected that if no type M[_] is given, the compiler is free to chose the first type which is a Traversable containing an Applicative.