[Haskell-cafe] Categories in base
David Menendez
dave at zednenem.com
Sun Oct 14 16:56:35 EDT 2007
On 10/14/07, Jean-Philippe Bernardy <jeanphilippe.bernardy at gmail.com> wrote:
> instance Arrow a => Functor (a r) where -- (not defined as such in base, but
> ad-hoc)
> f <$> g = pure f . g
Similarly:
instance Arrow a => Applicative (a r) where
return a = pure (const a)
a <*> b = pure (\(f,x) -> f x) . a &&& b
--
Dave Menendez <dave at zednenem.com>
<http://www.eyrie.org/~zednenem/>
More information about the Haskell-Cafe
mailing list