<div dir="ltr">On Fri, May 31, 2013 at 6:16 AM, mukesh tiwari <span dir="ltr"><<a href="mailto:mukeshtiwari.iiitm@gmail.com" target="_blank">mukeshtiwari.iiitm@gmail.com</a>></span> wrote:<br><div class="gmail_extra">
<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;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 style>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'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><br></div></div>-- <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>
</div></div>