Skip to content

Instantly share code, notes, and snippets.

@dminuoso
Created October 27, 2017 12:19
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 dminuoso/57297b5ddb216cfe216408a4cd946ae9 to your computer and use it in GitHub Desktop.
Save dminuoso/57297b5ddb216cfe216408a4cd946ae9 to your computer and use it in GitHub Desktop.
double = -> (e) { e * 2 }
doubleF = map double
doubleF.([1,2,3,4]) #=> [2,4,6,8]
doubleF.([]) #=> []
doubleF.(Just(3)) #=> Just 6
doubleF.(Nothing) #=> Nothing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment