CIFASIS   20631
CENTRO INTERNACIONAL FRANCO ARGENTINO DE CIENCIAS DE LA INFORMACION Y DE SISTEMAS
Unidad Ejecutora - UE
congresos y reuniones científicas
Título:
From monoids to near-semirings: the essence of MonadPlus and alternative
Autor/es:
RIVAS, EXEQUIEL; JASKELIOFF, MAURO; SCHRIJVERS, TOM
Reunión:
Simposio; 17th International Symposium on Principles and Practice of Declarative Programming; 2015
Resumen:
It is well-known that monads are monoids in the category of endofunctors, and in fact so are applicative functors. Unfortunately, the benefits of this unified view are lost when the additional nondeterminism structure of MonadPlus or Alternative is required.This article recovers the essence of these two type classes by extending monoids to near-semirings with both additive and multiplicative structure. This unified algebraic view enables us to generically define the free construction as well as a novel double Cayley representation that optimises both left-nested sums and left-nested products.