Monads, shapely functors, and traversals
نویسندگان
چکیده
This paper demonstrates the potential for combining the polytypic and monadic programming styles, by introducing a new kind of combinator, called a traversal. The natural setting for defining traversals is the class of shapely data types. This result reinforces the view that shapely data types form a natural domain for polytypism: they include most of the data types of interest, while to exceed them would sacrifice a very smooth interaction between polytypic and monadic programming.
منابع مشابه
Predicate Logic for Functors and Monads
This paper starts from the elementary observation that what is usually called a predicate lifting in coalgebraic modal logic is in fact an endomap of indexed categories. This leads to a systematic review of basic results in predicate logic for functors and monads, involving induction and coinduction principles for functors and compositional modal operators for monads.
متن کاملFusion for Free - Efficient Algebraic Effect Handlers
Algebraic effect handlers are a recently popular approach for modelling side-effects that separates the syntax and semantics of effectful operations. The shape of syntax is captured by functors, and free monads over these functors denote syntax trees. The semantics is captured by algebras, and effect handlers pass these over the syntax trees to interpret them into a semantic domain. This approa...
متن کاملPolynomial and Analytic Functors and Monads, revisited
We describe an abstract 2-categorical setting to study various notions of polynomial and analytic functors and monads.
متن کاملQf Functors and (co)monads
One reason for the universal interest in Frobenius algebras is that their characterisation can be formulated in arbitrary categories: a functor K : A → B between categories is Frobenius if there exists a functor G : B → A which is at the same time a right and left adjoint of K; a monad F on A is a Frobenius monad provided the forgetful functor AF → A is a Frobenius functor, where AF denotes the...
متن کاملConstructing Applicative Functors
Applicative functors define an interface to computation that is more general, and correspondingly weaker, than that of monads. First used in parser libraries, they are now seeing a wide range of applications. This paper sets out to explore the space of non-monadic applicative functors useful in programming. We work with a generalization, lax monoidal functors, and consider several methods of co...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- Electr. Notes Theor. Comput. Sci.
دوره 29 شماره
صفحات -
تاریخ انتشار 1999