Arc framework

Paul Graham's Arc Lisp web-framework looks very interesting. Hacker News is the first web-application implemented in Arc. Now the thing that really caught my eye was this elegant piece of code posted here:
(bestn 20
 (compare > [_ 2]) 
 (map (fn (user)
        (withs (stories (keep astory (submissions user))
                ns (len stories))
          (list user 
                ns
                (if (> ns 10)
                    (median (map [_ 'score] stories))
                    0))))
      (news-users)))) 

Just beautiful. Now imagine the possibilities :)

The above code calculates most karma pr. submission.

Code 22. Aug 2007
© Amir Salihefendic. Powered by Skeletonz.