Skip to content

Instantly share code, notes, and snippets.

@ruurtjan
Created May 22, 2020 09:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ruurtjan/35292bf9e0125cd3651eb71c93ba3d78 to your computer and use it in GitHub Desktop.
Save ruurtjan/35292bf9e0125cd3651eb71c93ba3d78 to your computer and use it in GitHub Desktop.
functional-dsl-blog-6.scala
object MoreOrthogonal {
def flatMap[A, B](l: List[A], f: A => List[B]): List[B] =
MoreOrthogonal.flatten(MoreOrthogonal.map(l, f))
def flatten[A](l: List[List[A]]): List[A] = ???
def map[A, B](l: List[A], f: A => B): List[B] = ???
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment