lib: modify lib/pipeline to work on iterators instead of collection
authorJean Privat <jean@pryen.org>
Mon, 24 Mar 2014 17:44:19 +0000 (13:44 -0400)
committerJean Privat <jean@pryen.org>
Mon, 24 Mar 2014 17:44:56 +0000 (13:44 -0400)
commit108d34e535c9822d704b0610ecbc965b5b3a23d8
treefecf27aeef55e59b8d7786064cfe8c4657e2f381
parent613ff51c06f8a46f2cc2f43d310226582fdb67ed
lib: modify lib/pipeline to work on iterators instead of collection

* Methods in `pipeline` are difficult to use because they are lazy.
* They are highly generic and return a abstract return type, thus
having them in Collection lead to strange API, like `[1,2,3].head(2)` that
is not an Array.
* Because they are in Collection, all standard class like Array show them
in their documentation, confusing beginners.

Moving all pipeline functions on Iterator solve these problems.

This basically reverts commit c0316e522d0d8053c0fb155bf1fbd14979a12202.

Signed-off-by: Jean Privat <jean@pryen.org>
lib/pipeline.nit
tests/sav/test_pipeline.res
tests/test_pipeline.nit