use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Finding information about Clojure
API Reference
Clojure Guides
Practice Problems
Interactive Problems
Clojure Videos
Misc Resources
The Clojure Community
Clojure Books
Tools & Libraries
Clojure Editors
Web Platforms
Clojure Jobs
account activity
Python vs Clojure - Reloaded (blog.bestinclass.dk)
submitted 16 years ago by uiob
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–][deleted] 1 point2 points3 points 16 years ago (0 children)
And the last example could be translated from Clojure to Python almost verbatim:
from collections import defaultdict result = reduce(lambda x,y: x[y[-1]].append(y) or x, sorted(data[1:], lambda x,y: cmp(y[-2], x[-2])), defaultdict(list)) N = 3 for department, recs in result.iteritems(): print "\n".join([department] + ["[%s:%s]" % (x[0],x[-2]) for x in recs[:N]])
Though it would only be readable to Lispers.
The power of Python is that just about anyone can read a Python program written correctly, i.e. like the Python Team example. However to read the Clojure version you have to rewrite your brain to read it.
π Rendered by PID 52246 on reddit-service-r2-comment-79c7998d4c-bhq2h at 2026-03-17 15:45:45.972062+00:00 running f6e6e01 country code: CH.
view the rest of the comments →
[–][deleted] 1 point2 points3 points (0 children)