<table class="cf gJ" cellpadding="0"><tbody><tr><td class="gF gK"><table class="cf ix" height="1" width="1" cellpadding="0"><tbody><tr><td><br></td></tr></tbody></table></td><td class="gH"><br></td><td class="gH"><br></td>
</tr></tbody></table>I found out I get the posts in my mail and I am clicking in the mailinglist. Therefore I am starting new threads over and over again. My apologies.<br><br>>Why add the extra tuple?<br>
>Better: Chain Char WordTree<br>
<br>
It feels a bit too loose. Think it is a imperative quirk. I remove the tupples.<br>
<br>
<br>
And I am going to change the type Rule to a Map. I have used that package before and it is fast<br>
and easy to use.<br>
<br>
Another question. I have a book Real World Haskell, which is great, but I would like to read somewhat more indepth<br>
stuff. Can you recommend one?<br>
<br>
Thanks for your advice.<br>
<br>
With kind regards,<br>
<br>
Edgar<br>
<br>
I switched to evolution. Hopefully it will take the in reply to field.<br><br><div class="gmail_quote">On Tue, Feb 9, 2010 at 11:07 PM, Patrick LeBoutillier <span dir="ltr"><<a href="mailto:patrick.leboutillier@gmail.com">patrick.leboutillier@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Daniel,<br>
<div class="im"><br>
> Sure. If you don't mind that the mutations come in a different order, one<br>
> thing that works wonders is "sequence",<br>
><br>
> sequence :: Monad m => [m a] -> m [a]<br>
><br>
> In particular, for m = [], sequence :: [[a]] -> [[a]]. Then, knowing what<br>
> sequence does, we can write<br>
><br>
> import Control.Monad (sequence)<br>
><br>
> generateAll :: String -> [String]<br>
> generateAll word = sequence (map f word)<br>
> where<br>
> f c = case lookup c leat of<br>
> Just r -> [c,r]<br>
> Nothing -> [c]<br>
<br>
</div><div class="im">That's very nice!<br>
<br>
One question though: In the docs sequence is described as:<br>
<br>
"Evaluate each action in the sequence from left to right, and<br>
collect the results."<br>
<br>
How is one supposed to deduce what the behavior will be for the list<br>
monad (besides looking at the source)?<br>
<br>
<br>
Patrick<br>
<br>
--<br>
=====================<br>
</div><div><div></div><div class="h5">Patrick LeBoutillier<br>
Rosemère, Québec, Canada<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Flatliner ICT Service,<br>Email: <a href="mailto:Edgar.klerks@gmail.com">Edgar.klerks@gmail.com</a>,<br>Tel: +31727851429<br>Fax: +31848363080<br>Skype: edgar.klerks<br>
Website: <a href="http://flatlinerict.nl">flatlinerict.nl</a><br>Adres: Koelmalaan 258,<br>1813JD, Alkmaar<br>Nederland<br>