6 ms·
Here is Rich Hickey's port of this Norvig exercise to Clojure: https://en.wikibooks.org/wiki/Clojure_Programming/Examples/Norvig_Spelling_Corrector https://en.
by hellofunk 8y ago
Here is Rich Hickey's port of this Norvig exercise to Clojure:
https://en.wikibooks.org/wiki/Clojure_Programming/Examples/Norvig_Spelling_Corrector https://en.wikibooks.org/wiki/Clojure_Programming/Examples/N...
- zerr 8y agoLooks pretty unreadable and verbose.
- abecedarius 8y agoIt turns out Hickey added some functions to Clojure to be able to write that code. Nothing wrong with that -- they're useful functions! -- but I found it kind of amusing. It can be good to be a king.
- hellofunk 8y agoI don't see any functions in that code that wouldn't have existed in Clojure 1.0. It's all pretty standard Clojure stuff, very basic 'for' constructs and generalized lazy sequences with 'range' and others. Which function were you thinking were explicitly added to the language that are in use here?
- abecedarius 8y ago"Along the way, Clojure got subs(tring), slurp (a file), max-key and min-key..." at https://groups.google.com/forum/#!topic/clojure/YDQdmAsUaFU https://groups.google.com/forum/#!topic/clojure/YDQdmAsUaFU
- hellofunk 8y agoThanks, that is definitely interesting. We have Norvig to thank for every-day Clojure functions.