Created
January 25, 2015 19:00
-
-
Save TheSeamau5/491a5ea53170fb6bca71 to your computer and use it in GitHub Desktop.
mapAll for Arrays
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) -> Array a -> Array (Array a) | |
mapAll f array = | |
let innerMap tempArray = | |
case head tempArray of | |
Nothing -> empty | |
Just x -> push (map (f x) array) (innerMap (rest tempArray)) | |
in | |
innerMap array |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment