Skip to content

Instantly share code, notes, and snippets.

@deque-blog
Created January 20, 2017 20:08
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 deque-blog/41eff0009510b3f5c7d7ad35553bb0f6 to your computer and use it in GitHub Desktop.
Save deque-blog/41eff0009510b3f5c7d7ad35553bb0f6 to your computer and use it in GitHub Desktop.
instance Functor ExprR where
fmap _ (Cst c) = Cst c
fmap _ (Var v) = Var v
fmap f (Op opType xs) = Op opType (map f xs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment