Idioms are Oblivious, Arrows are Meticulous, Monads are Promiscuous

نویسندگان

  • Sam Lindley
  • Philip Wadler
  • Jeremy Yallop
چکیده

We revisit the connection between three notions of computation: Moggi’s monads, Hughes’s arrows and McBride and Paterson’s idioms (also called applicative functors). We show that idioms are equivalent to arrows that satisfy the type isomorphism A;B ' 1 ; (A→ B) and that monads are equivalent to arrows that satisfy the type isomorphism A; B ' A → (1 ; B). Further, idioms embed into arrows and arrows embed into monads.

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

ثبت نام

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

منابع مشابه

An idiom’s guide to formlets

Formlets in Links decouple user interface from data, a vital form of abstraction supported by very few web frameworks. Formlets are best defined in terms of idioms, not monads or arrows as one might suppose from the existing literature.

متن کامل

Freyd is Kleisli, for Arrows

Arrows have been introduced in functional programming as generalisations of monads. They also generalise comonads. Fundamental structures associated with (co)monads are Kleisli categories and categories of (Eilenberg-Moore) algebras. Hence it makes sense to ask if there are analogous structures for Arrows. In this short note we shall take first steps in this direction, and identify for instance...

متن کامل

Arrows, like Monads, are Monoids

Monads are by now well-established as programming construct in functional languages. Recently, the notion of “Arrow” was introduced by Hughes as an extension, not with one, but with two type parameters. At first, these Arrows may look somewhat arbitrary. Here we show that they are categorically fairly civilised, by showing that they correspond to monoids in suitable subcategories of bifunctors ...

متن کامل

Leibniz’s Monads and Mulla Sadra’s Hierarchy of Being: A Comparative Study

Mulla Sadra and Leibniz, the two philosophers from the East and the West, belong to two different worlds. Though they were unaware of the ideas of each other, their philosophical systems share certain common points that are comparable. Monads constitute the basis of Leibniz's thought and he refers to their features in his various works. On the other side, Mulla Sadra's philosophy is also based ...

متن کامل

Monads Need Not Be Endofunctors

We introduce a generalisation of monads, called relative monads, allowing for underlying functors between different categories. Examples include finite-dimensional vector spaces, untyped and typed λ-calculus syntax and indexed containers. We show that the Kleisli and Eilenberg-Moore constructions carry over to relative monads and are related to relative adjunctions. Under reasonable assumptions...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:
  • Electr. Notes Theor. Comput. Sci.

دوره 229  شماره 

صفحات  -

تاریخ انتشار 2011