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

A clause in Prolog is a predicate that is true when its conditions are met, i.e., can be seen as a single conditional in itself. Furthermore, there is pattern matching (unification, even), which was declared cheating in the post. Fibonacci examples would use this, just as the Erlang example in the post. There are also if-then rules (the -> operator), which I find makes code clearer. The same trick described in the post could be implemented in Prolog I suppose.



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

Search: