Created
January 2, 2015 02:35
-
-
Save jtrim/4ba447a986cc4aebce23 to your computer and use it in GitHub Desktop.
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 theStuff = ["foo", "bar", "baz"] | |
| -- in foldl............................................. vvv is first, vvv is second... | |
| let wtffoldl = foldl iterator "" theStuff where iterator concatedStuffs stuff = concatedStuffs ++ stuff | |
| -- ...but in foldr.......................................vvv and vvv are reversed. | |
| let wtffoldr = foldr iterator [] theStuff where iterator stuff concatedStuffs = stuff ++ concatedStuffs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment