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

    `cond` still returns the same output even though its input args 
    have changed. So `cond` is not a function anymore!
It sounds like you're holding the definition of "pure function" backwards: a pure function can't give a different OUTPUT for the same INPUT.

A feature like "cond" is usually implemented as a macro (since the arguments are only evaluated sometimes) but that's ultimately just a shorthand for a bunch of extra "quote" wrapping.




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

Search: