Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upCurious why foldl in haskell has a different type than elm. #764
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
process-bot
Nov 29, 2016
Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!
Here is what to expect next, and if anyone wants to comment, keep these things in mind.
process-bot
commented
Nov 29, 2016
|
Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it! Here is what to expect next, and if anyone wants to comment, keep these things in mind. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
MrRacoon
commented
Nov 29, 2016
|
oh interesting, just saw this: elm/compiler#346 |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
evancz
Nov 30, 2016
Member
Yep, that's the reasoning! This way you can write functions such that "The data structure is always last" and it works nice with folds. The direction of your fold shouldn't require a refactor IMO.
|
Yep, that's the reasoning! This way you can write functions such that "The data structure is always last" and it works nice with folds. The direction of your fold shouldn't require a refactor IMO. |
evancz
closed this
Nov 30, 2016
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
MrRacoon
commented
Nov 30, 2016
•
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
evancz
Nov 30, 2016
Member
I think it'd be better to talk about this more on the Slack or on elm-discuss.
|
I think it'd be better to talk about this more on the Slack or on elm-discuss. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
MrRacoon
commented
Nov 30, 2016
|
Aye! |

MrRacoon commentedNov 29, 2016
•
edited
Edited 1 time
-
MrRacoon
edited Nov 29, 2016 (most recent)
In elm (5.0.0):
In haskell:
notice the arguments of the function given to foldl seem to be backwards. Is that intended?