Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This seems like the same thing that lisp has had since forever in cond. In CL:

(defun is-greater-than (x y) (cond ((< x y) T) (T nil)))

As with the erlang example, I need a T test to get an else clause, although in this particular example, the result of the cond is nil if nothing matches anyway.



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

Search: