Last active
September 8, 2018 04:30
-
-
Save tibastral/917215ffe1353ce7eeb6094881a08230 to your computer and use it in GitHub Desktop.
This file contains 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
add2AndProduct1 : List Int -> Int | |
add2AndProduct1 list = | |
List.product (List.map (\e -> e + 2) list) | |
add2AndProduct2 : List Int -> Int | |
add2AndProduct2 list = | |
list | |
|> List.map (\e -> e + 2) | |
|> List.product | |
add2AndProduct3 : List Int -> Int | |
add2AndProduct3 list = | |
list | |
|> List.map ((+) 2) | |
|> List.product | |
add2AndProduct4 : List Int -> Int | |
add2AndProduct4 = | |
List.map ((+) 2) >> List.product |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment