Monads, shapely functors, and traversals

نویسندگان

  • Eugenio Moggi
  • Gianna Bellè
  • C. Barry Jay
چکیده

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.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

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