Commit a259b9d0 authored by Florian Strunz's avatar Florian Strunz
Browse files

[10] mapAccumFlatMap template

parent d04af372
...@@ -10,4 +10,8 @@ object FP10 { ...@@ -10,4 +10,8 @@ object FP10 {
(b, s2) = f(a, s1) (b, s2) = f(a, s1)
_ <- set(s2) _ <- set(s2)
} yield b).run(s).value.swap } yield b).run(s).value.swap
// Aufgabe 1: mapAccum mit flatMap und map
def mapAccumFlatMap[F[_]:Traverse,S,A,B](fa: F[A], s: S)(f: (A, S) => (B, S)): (F[B], S) = ???
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment