<div dir="ltr">Hi Brandon,<br><div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 31, 2013 at 8:01 PM, Brandon Allbery <span dir="ltr">&lt;<a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">On Fri, May 31, 2013 at 6:16 AM, mukesh tiwari <span dir="ltr">&lt;<a href="mailto:mukeshtiwari.iiitm@gmail.com" target="_blank">mukeshtiwari.iiitm@gmail.com</a>&gt;</span> wrote:<br>
<div class="gmail_extra">
<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div>Data.List can be abstracted using Foldable and Traversable but unfortunately I could not find the functions corresponding to head, take.<br>

</div></div></div></blockquote><div><br></div><div>Those are, again, more general than you want. What is the `head` of a HashMap? (Consider that an implementation may choose to randomize the hash function to avoid hash collision attacks.) Foldable and Traversable express the concept of a collection which has no meaningful concept of an element&#39;s relative position within the collection. ListLike adds the concept of position, thereby admitting an indexing operation (and, by extension, `head` which is index 0).</div>
</div></div></div></blockquote><div><br>Thanks for explanation. Precisely a tree was in the mind so there is no concept of head or take. Data.Foldable.toList could be used to convert the foldable structure to list but again it&#39;s not useful because Giacomo wants to abstract the List. <br>
<br></div><div>-Mukesh <br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">
<span class=""><font color="#888888">
<div><br></div></font></span></div><span class=""><font color="#888888">-- <br><div dir="ltr"><div>brandon s allbery kf8nh                               sine nomine associates</div><div><a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a>                                  <a href="mailto:ballbery@sinenomine.net" target="_blank">ballbery@sinenomine.net</a></div>

<div>unix, openafs, kerberos, infrastructure, xmonad        <a href="http://sinenomine.net" target="_blank">http://sinenomine.net</a></div></div>
</font></span></div></div>
<br>_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org">Beginners@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/beginners" target="_blank">http://www.haskell.org/mailman/listinfo/beginners</a><br>
<br></blockquote></div><br></div></div></div>