Created
December 17, 2014 23:12
-
-
Save TheSeamau5/9bab2b31efcf8c91b786 to your computer and use it in GitHub Desktop.
MapAll Function in Elm. Applies a 2-ary function to each element in a list to each element in a list
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
mapAll : (a -> a -> a) -> List a -> List (List a) | |
mapAll f list = | |
let innerMapAll f tempList = | |
case tempList of | |
[] -> [] | |
x :: xs -> map (f x) list :: innerMapAll f xs | |
in innerMapAll f list |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment