Stefan O'Rear wrote:
On Sat, Mar 24, 2007 at 08:05:25PM +, Paul Johnson wrote:
strings, are instances of the Monoid class (i.e. they implement mplus in
the way you would expect). You just have to wrap a function around
Actually they don't.
[EMAIL PROTECTED]:/tmp$ ghc-6.4.2 -v0 -
Leandro Penz wrote:
> buildStuff =
> func1 ++ func2 ++ func3 ++ func4
>
> My idea is to have a monad with a concatenating >>, so that I can:
>
> bulidStuff = do
> func1
> func2
> func3
> func4
buildStuff = concat [
func1,
func2,
func3,
func4 ]
Remember,
On Sat, Mar 24, 2007 at 08:05:25PM +, Paul Johnson wrote:
> strings, are instances of the Monoid class (i.e. they implement mplus in
> the way you would expect). You just have to wrap a function around
Actually they don't.
[EMAIL PROTECTED]:/tmp$ ghc-6.4.2 -v0 -e 'main' X.hs
ABend
[EMAIL P
Leandro Penz wrote:
I have some functions that build big strings by calling other
functions and appending the result, like
buildStuff =
func1 ++ func2 ++ func3 ++ func4
The usual idiom is something like
buildStuff = concat [func1, func2, func3, func4]
Put the list elements on separate li
My idea is to have a monad with a concatenating >>, so that I can:
bulidStuff = do
func1
func2
func3
func4
Leandro Penz
I actually did this recently for a project I have been working on.
First, an example:
output label a@(I.Add a1 a2 a3) = do
comment (show a)
mov' label eax a1
Leandro Penz wrote:
My idea is to have a monad with a concatenating >>, so that I can:
bulidStuff = do
func1
func2
func3
func4
You could do this, but it's easier to take advantage of the fact that []
is an instance of MonadPlus, and just use `mplus`.
http://www.haskell.org/
Hi
I'm new here and this is my first mail to the list, so be gentle :)
I have some functions that build big strings by calling other functions and
appending the result, like
buildStuff =
func1 ++ func2 ++ func3 ++ func4
My idea is to have a monad with a concatenating >>, so that I can:
bulid