Backtracking with cut via a distributive law and left-zero monoids*
Backtracking with cut via a distributive law and left-zero monoids*
复制标题
通过分配律和左零幺半群进行回溯和切割*
DOI:
--
复制
发表时间:
2017
影响因子:
1.1
通讯作者:
S. Staton
中科院分区:
文献类型:
--
作者:
Maciej Piróg;S. Staton
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.