Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Meta: add new methods #9

Open
Athari opened this issue Jun 6, 2015 · 1 comment
Open

Meta: add new methods #9

Athari opened this issue Jun 6, 2015 · 1 comment
Assignees
Labels

Comments

@Athari
Copy link
Owner

Athari commented Jun 6, 2015

Ideas for new methods to add and example implementations in other libraries.

linq.js

  • must: Zip, Concat, Insert, Let, Memoize, MemoizeAll, BufferWithCount, SequenceEqual, Reverse
  • high: CascadeBreadthFirst, CascadeDepthFirst, Flatten, Scan, PreScan, Alternate, DefaultIfEmpty, Shuffle
  • maybe: Pairwise, PartitionBy, TakeExceptLast, TakeFromLast, Share

Ix

  • Defer, Case, DoWhile, If, IsEmpty, (Skip|Take)Last, StartWith, While

MoreLinq

  • Batch(Chunk?), Pad, (Skip|Take)Until, (Skip|Take)Every, Zip(Shortest|Longest)

EvenMoreLinq

  • Permutations, Subsets, PermutedSubsets, Random, RandomSubset, Slice

LinqLib

  • Permutations, Combinations, Statistical

PHP

  • Iterators: Recursive*Iterator
  • arrays: combine, flip, merge[_recursive], rand, replace[_recursive], walk_recursive, extract

other

  • toTable, toCsv, toExcelCsv

P.S. If you need any of these methods or have any other ideas for new features, please let me know. New features aren't high priority until someone actually needs them.

@Athari Athari added the type:feature Feature label Jun 6, 2015
@Athari Athari self-assigned this Jun 6, 2015
@BLumia
Copy link

BLumia commented Jan 26, 2021

Would like to leave a +1 for DefaultIfEmpty, which is also in .NET linq API. I think this can be very useful when need to do something like this:

from($ee)->skipWhile($invalidFunc)->average(
    function($p) { return $p['latency']; }
)

Since after skipWhile the data could be empty, calling average() may cause issue, I think DefaultIfEmpty can be useful here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants