Hacker News new | past | comments | ask | show | jobs | submit login

You could have 'if' as a function, but it would mean you'd have to encase any non-literal condition in a function:

    (if (zero? x)
      0
      #(dec x))
To me, this seems a rather counter-intuitive step with very little benefit. People rarely need to use "if" as a function, so having "if" as a macro optimizes for the common case.



Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: