Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Haskell Container class

Tags:

haskell

Is there a good standard (or just stable) implementation of (ordered) Container class?

Container class should provide basic manipulation operations with it's instances. Typical instances should be: Array, List, e.t.c.

Operations are:

  • take n'th element from container;
  • take n first element's of container;
  • and so on.

Why do I need this? With the help of this class I can, for example, define some function for processing something in container, and use it with any container that I need.

like image 283
Anon Imous Avatar asked Dec 03 '25 22:12

Anon Imous


1 Answers

It sounds like you may find ListLike interesting. index and take, respectively, cover the two operations you mentioned and it includes some 'typical instances'.

like image 74
raymonad Avatar answered Dec 06 '25 16:12

raymonad



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!