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

As someone who had a prolog class last year and who really had a hard time understanding cut, this clears up a lot. Essentially, we were taught to write predicates without cut, and if they didn't yield proper results to introduce cut higher and higher up the predicate tree until they did.

I always felt that the language was more incomplete for having (needing) such an imperative construct in an otherwise entirely declarative design.



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

Search: