Skip to content

Commit

Permalink
Merge pull request #465 from steshaw/master
Browse files Browse the repository at this point in the history
Remove answer to exercises 12.14
  • Loading branch information
runarorama committed May 10, 2016
2 parents c19dd4c + 2643bd4 commit 5b0115a
Showing 1 changed file with 1 addition and 8 deletions.
Expand Up @@ -99,14 +99,7 @@ trait Traverse[F[_]] extends Functor[F] with Foldable[F] {
def sequence[G[_]:Applicative,A](fma: F[G[A]]): G[F[A]] =
traverse(fma)(ma => ma)

type Id[A] = A
val idMonad = new Monad[Id] {
def unit[A](a: => A) = a
override def flatMap[A,B](a: A)(f: A => B): B = f(a)
}

def map[A,B](fa: F[A])(f: A => B): F[B] =
traverse[Id, A, B](fa)(f)(idMonad)
def map[A,B](fa: F[A])(f: A => B): F[B] = ???

import Applicative._

Expand Down

0 comments on commit 5b0115a

Please sign in to comment.