Hostname: page-component-6898cfcb55-zsp5v Total loading time: 0 Render date: 2026-11-11T04:11:36.441Z Has data issue: false hasContentIssue false

Backtracking with cut via a distributive law and left-zero monoids*

Published online by Cambridge University Press:  13 July 2017

MACIEJ PIRÓG
Affiliation:
University of Wrocław, Poland (e-mail: maciej.adam.pirog@gmail.com)
SAM STATON
Affiliation:
University of Oxford, UK
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the 'Save PDF' action button.

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.

Information

Type
Theoretical Pearls
Copyright
Copyright © Cambridge University Press 2017 
Submit a response

Discussions

No Discussions have been published for this article.