4 ms·
If I were reviewing someone's code, I would be quite surprised to see this: addOne :: [Int] -> [Int] It's not idiomatic in FP (as far as I'm aware) to bak
by yakshaving_jgt 5y ago
If I were reviewing someone's code, I would be quite surprised to see this:
addOne :: [Int] -> [Int]
It's not idiomatic in FP (as far as I'm aware) to bake the structure in like that.
- Rodeoclash 5y agoTrue, the example could be better: const addOne = (n) => { return n + 1} map(addOne)([1, 2, 3]) > [2, 3, 4] Would decompose the addOne into its own standalone function. My only excuse was that I was in a hurry due to Minecraft time with my son.