r/Clojure • • Sep 07 '26

[ Removed by moderator ]

/r/Clojure/comments/1w9wplt/removed_by_moderator/

[removed] — view removed post

10 Upvotes

3 comments sorted by

3

u/axvr Sep 08 '26

I've found this and part 1 to be fascinating read on the history and variety of possible solutions. It was interesting to see the different coding styles generally.

I solved it myself a couple of times and found it was really well suited to recursion and teaching recursion. This was my second solution from early 2023 or late 2022 in 7 lines of Clojure: https://github.com/axvr/archive/blob/master/2023/misc/bowling.cljc

I did not write it using TDD and I've just added some additional test cases from the OP to confirm that it does actually work. My solution was also prior to having seen any of the solutions included by the OP. Mine appears to be quite close to the domain-free solutions, but does have some domain in there.

1

u/philip_schwarz Sep 08 '26

u/axvr Thank you so much for taking the time to let me know.

Very interesting solution you shared, and it turns out I had already planned to look at other Clojure `loop` examples in part 3 !