-
-
Save dimitris-papadimitriou-chr/2610f3cb5d3b176c33da1208d8345313 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
| var sum = fold([2, 3, 4], Sum.empty, Sum.concat); | |
| var product = fold([2, 3, 4], 1, (x, y) => x * y); | |
| var max = fold([2, 3, 4], Number.MIN_SAFE_INTEGER, (x, y) => x > y ? x : y); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment