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

What is magical and mind-bending about `amb` is that it rewinds through arbitrary complicated call stacks, similar to an exception. This is why it's necessarily a special form.

The Haskell version requires each callee to be annotated with the `Amb` return type. It cannot be used to escape unless the caller is prepared for it to escape. That's a significant limitation (but all we're really saying is that Haskell doesn't support call/cc).



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

Search: