Advertisement
Guest User

Functor is wrong

a guest
Apr 20th, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ParseResult : Type -> Type
  2. ParseResult parseResult = Either String (String, parseResult)
  3.  
  4. Parser : Type -> Type
  5. Parser parseResult = String -> ParseResult parseResult
  6.  
  7. implementation Functor (Parser a) where
  8.   map f p = (\s => (f <$> (p s)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement