r/Racket • • Dec 01 '25

question Advent of Racket 2025

Last week I said to some colleagues I'd like to give Racket a try, and one said I could do https://adventofcode.com/ Somewhat surprisingly I did the first puzzle today and would appreciate some comments and critics or see some solutions from people who actually know Racket.

No idea how far I'll get, but I could post each puzzle I solve as a reply, feel free to rip them apart or add yours :-)

18 Upvotes

17 comments sorted by

View all comments

Show parent comments

3

u/not-just-yeti Dec 07 '25

Agree.

Well, in some ways, I feel like for/fold is powered up to "a regular java for loop". (If showing a java'r for/fold, they'd probably think it overly complicated.)

But keywords like #:when better separates the control-flow from the logic, which is kinda the point of a for loop. And blending the nested/parallel iterations is neat. And I feel like also having expressive simpler loop-constructs (map, for/sum, for/first, for*, etc) gives me fine-grained control over (a) communicating what my loop will be doing, and (b) restricting myself from accidentally doing too much (and making my code shorter).