Hacker News new | past | comments | ask | show | jobs | submit login

If the list was a list of game states,

would foldl makes sense as a map that teats for winning or death conditions?




No, you want foldr for that because you want the fold to finish as soon as you reach one of those conditions.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: