<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 22, 2013 at 12:06 AM, martin <span dir="ltr">&lt;<a href="mailto:martin.drautzburg@web.de" target="_blank">martin.drautzburg@web.de</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":1rd" style="overflow:hidden">It seems like fromList is as pretty as it gets. Actually it is not<br>
that bad.<br></div></blockquote></div><br>Agreed. What you might want to look  into is the difference between /expressions/ and imperative statements, also known as /commands/.</div><div class="gmail_extra"><br></div><div class="gmail_extra">

The effectful nature of commands is typically modeled in Haskell using monads, which may explain your references to do-notation and chaining functions.</div><div class="gmail_extra"><br></div><div class="gmail_extra">The mapping operations you&#39;re asking about can be easily /described/ using expressions, so monads don&#39;t need to enter the picture. Minimize effects whenever possible.</div>

<div class="gmail_extra"><br></div><div class="gmail_extra">E.g.</div><div class="gmail_extra"><br></div><div class="gmail_extra">&gt; m0 = fromList [(key1,val1),(key2,val2)]<br></div><div class="gmail_extra">&gt; m1 = m0 &lt;&gt; fromList [(key3,val3),(key4,val4)]<br>

</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div>-- Kim-Ee</div>
</div></div>