Created
March 19, 2017 17:59
-
-
Save artur-s/ab2823d705b30b9b81b0f75a03c4e6d6 to your computer and use it in GitHub Desktop.
Composing functors is for free
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let optionListMap f = (Option.map >> List.map) f | |
let square x = x * x | |
let squareLifted = optionListMap square | |
squareLifted [Some 2; None; Some 3] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment