Hal Daume wrote:
> > Yeah, but given that sequence_ is essentially the direct monadic
> > translation of fold:
> > that might be considered cheating (i.e. we can implement fold using
> > only map and fold, although the fold can be "disguised").
> >
> > As mentioned above, sequence_ etc are essen
Hi, quick reply :)...i've reordered some of what you've said (i hope you
don't mind!)
> However the monad is defined, sequence_ has to process the entire list
> before anything can be determined about the result. The entire result
> of (>>) depends upon both arguments, whereas you can deduce the h
Hal Daume wrote:
> > map f = foldr ((:) . f) []
>
> as I understand it, this is essentially because foldr encapsulates all
> primitive recursive functions and since map is primitive recursive, we
> can implement it in terms of a fold.
>
> one thing that is interesting to note is that if we are