Thanks, Brandon, but Ryan gave me what I was looking for.

Michael

--- On Tue, 8/31/10, Brandon S Allbery KF8NH <[email protected]> wrote:

From: Brandon S Allbery KF8NH <[email protected]>
Subject: Re: [Haskell-cafe] On to applicative
To: [email protected]
Date: Tuesday, August 31, 2010, 4:35 PM

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 8/31/10 13:27 , michael rice wrote:
> So it's a type constructor, not a type? Could you please provide a simple
> example of its usage?

Assuming you don't mean the trivial use in defining functions, see
Control.Monad.Instances:

> instance Functor ((->) r) where
>         fmap = (.)
> 
> instance Monad ((->) r) where
>         return = const
>         f >>= k = \ r -> k (f r) r

(The above is the primitive reader functor/monad, see Control.Monad.Reader
for more information.)

- -- 
brandon s. allbery     [linux,solaris,freebsd,perl]      [email protected]
system administrator  [openafs,heimdal,too many hats]  [email protected]
electrical and computer engineering, carnegie mellon university      KF8NH
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.10 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkx9Z4EACgkQIn7hlCsL25WgrwCgvFQlObavv1fNOaKDjB/qbk8t
8+IAoLUrenXFzZFfJoYYvSy00uPctnaE
=ljiY
-----END PGP SIGNATURE-----
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe



      
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to