Jonathan Cast wrote:
On Sat, 2009-01-17 at 12:04 +, Andrew Coppin wrote:
instance (Monad m) = Functor m where
fmap f ma = do a - ma; return (f a)
While that's quite interesting from a mathematical point of view, how is
this useful for programming purposes?
Good
On Sun, Jan 18, 2009 at 3:23 AM, Andrew Coppin
andrewcop...@btinternet.com wrote:
Given that liftM exists, why is having an identical implementation for fmap
useful?
For many structures, it's easier to define (=) in terms of fmap and
join. For these objects, often the generic implementation of
On Sun, Jan 18, 2009 at 3:23 AM, Andrew Coppin
andrewcop...@btinternet.comwrote:
Jonathan Cast wrote:
On Sat, 2009-01-17 at 12:04 +, Andrew Coppin wrote:
instance (Monad m) = Functor m where
fmap f ma = do a - ma; return (f a)
While that's quite interesting from a mathematical
On Sun, 2009-01-18 at 11:23 +, Andrew Coppin wrote:
Jonathan Cast wrote:
On Sat, 2009-01-17 at 12:04 +, Andrew Coppin wrote:
instance (Monad m) = Functor m where
fmap f ma = do a - ma; return (f a)
While that's quite interesting from a mathematical point of
Eugene Kirpichov wrote:
No, a functor is a more wide notion than that, it has nothing to do
with collections.
An explanation more close to truth would be A structure is a functor
if it provides a way to convert a structure over X to a structure over
Y, given a function X - Y, while preserving
2009/1/17 Andrew Coppin andrewcop...@btinternet.com:
Eugene Kirpichov wrote:
No, a functor is a more wide notion than that, it has nothing to do
with collections.
An explanation more close to truth would be A structure is a functor
if it provides a way to convert a structure over X to a
On Sat, Jan 17, 2009 at 5:04 AM, Andrew Coppin
andrewcop...@btinternet.comwrote:
Eugene Kirpichov wrote:
No, a functor is a more wide notion than that, it has nothing to do
with collections.
An explanation more close to truth would be A structure is a functor
if it provides a way to convert
Hello Luke,
Saturday, January 17, 2009, 3:16:06 PM, you wrote:
fmap id = id
fmap (f . g) = fmap f . fmap g
The first property is how we write preserving underlying
structure, but this has a precise, well-defined meaning that we can
say a given functor obeys or it does not (and if it
On Saturday 17 January 2009 8:28:05 am Bulat Ziganshin wrote:
Hello Luke,
Saturday, January 17, 2009, 3:16:06 PM, you wrote:
fmap id = id
fmap (f . g) = fmap f . fmap g
The first property is how we write preserving underlying
structure, but this has a precise, well-defined
On Sat, 2009-01-17 at 12:04 +, Andrew Coppin wrote:
Eugene Kirpichov wrote:
No, a functor is a more wide notion than that, it has nothing to do
with collections.
An explanation more close to truth would be A structure is a functor
if it provides a way to convert a structure over X to
10 matches
Mail list logo