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

Personally I prefer (cond ((< a b) -1) ((> a b) 1) (t 0))

Or, if that's too many parens for you:

(mcond (< a b) -1 (> a b) 1 0)

The definition of MCOND is four lines of code and can be found here:

https://github.com/rongarret/ergolib/blob/master/core/ergoba...




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

Search: