needed-libraries icon indicating copy to clipboard operation
needed-libraries copied to clipboard

Iterutils

Open alehander92 opened this issue 8 years ago • 5 comments

(From Nim community survey 2017)

alehander92 avatar Nov 16 '17 09:11 alehander92

I'm not very involved in the nim community, so I'm probably missing something, but I think these issues would be much more useful if there were fewer and each had a more defined set of goals.

I might be interested in contributing to a community iterutils module, but there is no info here about what that is, how it goes beyond what sequtils does, or any information.

Am I missing that type of writing or some other critical insight somewhere?

brentp avatar Nov 25 '17 03:11 brentp

The issues were based on the community survey results, so a lot of them don't contain much additional info.

It's perfectly possible that a group of issues can be merged into one, and that already happened with some of the scientific one-s. I'll admit I didn't have much time to postprocess a lot of the issues, but I might try to refine them this weekend

About this one: I guess it's about implementing a module similar to Python's itertools: the equivalent functionality currently is in sequtils and algorithm.

Currently new "functional" functions are usually added to sequtils, so if you have any useful in mind, I guess that would be the way to go

alehander92 avatar Nov 25 '17 08:11 alehander92

Iterutils would be the equivalent of Python itertools

Currently you can look into @alehander42's zero_functional for inline iterators, @petermora's nimLazy for closure iterators and @vegansk's nimfp for Haskell/Scala-like iterators on a functional List (singly linked-list)

I agree with @alehander42: target functionality should be Python itertools, note that reduce is defined in functools.

mratsim avatar Nov 25 '17 08:11 mratsim

Iterutils would be the equivalent of Python itertools

I cannot promise anything, but I'll give it a try and see what can I implement.

narimiran avatar Nov 25 '17 15:11 narimiran

I have created itertools which is a translation of (most of) Python's itertools.

If there's anything else that would be a good addition to it, please let me know!

narimiran avatar Mar 26 '18 15:03 narimiran