Article contents
Backtracking with cut via a distributive law and left-zero monoids*
Published online by Cambridge University Press: 13 July 2017
Abstract
We employ the framework of algebraic effects to augment the list monad with the pruning cut operator known from Prolog. We give two descriptions of the resulting monad: as the monad of free left-zero monoids, and as a composition via a distributive law of the list monad and the ‘unary idempotent operation’ monad. The scope delimiter of cut arises as a handler.
- Type
- Theoretical Pearls
- Information
- Copyright
- Copyright © Cambridge University Press 2017
Footnotes
Research supported by a Royal Society University Research Fellowship and EPSRC Grant EP/N007387/1
References
- 5
- Cited by
Discussions
No Discussions have been published for this article.