2 ms·
Racket has for/list and even for/fold. They’re just different syntax for map and foldl. I prefer them to the functional versions sometimes so I don’t have to w
by srcreigh 4y ago
Racket has for/list and even for/fold. They’re just different syntax for map and foldl.
I prefer them to the functional versions sometimes so I don’t have to write lambda, the for loops have options for combining multiple lists, etc.
- taeric 4y agoThe loop macro is impressive for many of its esoteric keywords. Maximizing, collect, append, etc. There is also the for/then construct that I find much easier to work with than alternatives for the same behavior. I have no doubt much of this can be done with the racket constructs. But I still find I can more easily read loop usages I've written in the past. Whereas many similarly dense for/folds are opaque within a few minutes for me. :(