[Agda] Monads in std lib
Nils Anders Danielsson
nad at Cs.Nott.AC.UK
Thu Oct 1 15:19:30 CEST 2009
On 2009-10-01 12:07, Jim Burton wrote:
> Tips?
module MonadExample where
open import Category.Monad
open import Data.Maybe as Maybe
open import Data.Nat
maybeAdd : Maybe ℕ → Maybe ℕ → Maybe ℕ
maybeAdd x y = x >>= λ x' →
y >>= λ y' →
return (x' + y')
where open RawMonad Maybe.monad
--
/NAD
This message has been checked for viruses but the contents of an attachment
may still contain software viruses, which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.
More information about the Agda
mailing list