Skip to content

Comment on How Hacker News ranking algorithm worksparent

Comments

I've barely looked at Arc[1] but as far as I remember, the if macro/special form allows an arbitrary number of argument forms, a bit like a combination of Clojure/CL's if and cond:

  (if
    cond1  expr1
    cond2  expr2
    ..     ..
    condN  exprN
           else-expr)
With an even number of arguments, there is no else-expr (the same as CL/Clojure cond).

The indentation is probably to distinguish between condition and conditional expression - the second column is what could be evaluated and returned from the whole expression.

[1] I too use Clojure

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.