3 ms·
I've noticed that these differing approaches lead to argument order being flipped sometimes. https://wiki.call-cc.org/man/5/Module%20(chicken%20string)#string-
by jim-jim-jim 6y ago
I've noticed that these differing approaches lead to argument order being flipped sometimes.
https://wiki.call-cc.org/man/5/Module%20(chicken%20string)#string-split https://wiki.call-cc.org/man/5/Module%20(chicken%20string)#s...
Because Chicken's `string-split` expects its delimiter to be optional, it wants a string first.
https://hackage.haskell.org/package/text-1.2.4.0/docs/Data-Text.html#v:splitOn https://hackage.haskell.org/package/text-1.2.4.0/docs/Data-T...
While Haskell's emphasis on composition means it's more logical for the constant parameter—the delimiter—to be provided first.
It's not a great example, but the first one I can think of. The difference is starker when the Lisp command has many more parameters than the Haskell one, with some of them being optional. When trying to write cute point-free code in Scheme, I found myself using `flip` too much for it to be fruitful.
- thomasahle 6y agoI hate when I have to do flip. Dislike reading it even more. I don't know what the solution is, other than using points..