MapAll Function in Elm. Applies a 2-ary function to each element in a list to each element in a list
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
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