Created
August 23, 2014 15:20
-
-
Save kclay/063b321e9ec610c003be to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ToFunctional[T, A >: Var](seq: Sequence[T]) { | |
def concatMap[B <: Typed, Inner](f: A => B)(implicit cm: CanMap[T, B, Inner]) = ConcatMap[Inner](seq.underlying, FuncWrap(f)) | |
def map[B <: Typed, Inner](f: A => B)(implicit cm: CanMap[T, B, Inner]) = RMap[Inner](seq.underlying, FuncWrap(f)) | |
def reduce[P](f: (A, A) =>Produce0[P])(implicit =:!=[T, ChangeCursor[_]] = Reduce[T,P](seq.underlying, f) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment