Skip to main content

Home/ Haskell/ Contents contributed and discussions participated by Javier Neira

Contents contributed and discussions participated by Javier Neira

Javier Neira

Applicative-what? Functor-who? « wxfz :: Blog - 0 views

  • Monads Are  a kind of abstract data type used to represent computations (instead of data in the domain model).
Javier Neira

http://haskell.on-a-horse.org - 1 views

  •  
    Haskell on a Horse (HoH) is a combinatorial web framework for the programming language Haskell.
Javier Neira

Understanding Monads Via Python List Comprehensions « All Unkept - 0 views

  • But here we have taken it to a higher level -- the Monad interface is like an abstraction of any kind of container.
  • This in turn leads to the concept that a monadic value represents a computation -- a method for computing a value, bound together with its input value.
  • Writing monads is hard, but it pays off as using them in Haskell is surprisingly easy, and allows you to do some very powerful things.
  • ...3 more annotations...
  • One of them you have seen explicitly -- it's the 'return' method, responsible for packing things up into the monad. The other is called 'bind' or '>>=', and it does the 'unpacking' involved with the <- arrow in the do notation.
  • the 'bind' method doesn't really unpack and return the data. Instead, it is defined in such a way that it handles all unpacking 'internally', and you have to provide functions that always have to return data inside the monad.
  • It looks very much like 'unpack this data from the monad so I can use it', so it helps conceptually. In fact, together with the rest of the body of the 'do' block it forms an anonymous lambda function,
1 - 0 of 0
Showing 20 items per page