ChrisInSeattle / morelinq

Automatically exported from code.google.com/p/morelinq
Apache License 2.0
0 stars 0 forks source link

IList<T> view operators from Stephen Cleary #32

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Merge some or all of the operators from Stephen Cleary:

Operators for IEnumerable<T> lifted from List<T>/Array:
  int IndexOf<T>(this IEnumerable<T> source, T value)
  int IndexOf<T>(this IEnumerable<T> source, Func<T, bool> predicate) // 
List<T>.FindIndex
  int LastIndexOf<T>(this IEnumerable<T> source, T value)
  int LastIndexOf<T>(this IEnumerable<T> source, Func<T, bool> 
predicate) // List<T>.FindLastIndex

Operators for IList<T> lifted from List<T>/Array:
  IList<T> AsReadOnly<T>(this IList<T> list)
  void CopyTo<T>(this IList<T> list, int index, IList<T> destination, int 
destinationIndex, int count)
  void CopyTo<T>(this IList<T> list, IList<T> destination, int 
destinationIndex)
  void CopyTo<T>(this IList<T> list, IList<T> destination)
  int LastIndexOf<T>(this IList<T> list, T value)
  int LastIndexOf<T>(this IList<T> list, Func<T, bool> predicate) // 
List<T>.FindLastIndex

Operators optimized for IList<T> from Enumerable (.NET 3.5):
  IList<TResult> Select<TSource, TResult>(this IList<TSource> list, 
Func<TSource, TResult> selector)
  IList<TResult> Select<TSource, TResult>(this IList<TSource> list, 
Func<TSource, int, TResult> selector)
  IList<T> Skip<T>(this IList<T> list, int offset)
  IList<T> Take<T>(this IList<T> list, int count)
  IList<T> Reverse<T>(this IList<T> list)
  T Last(this IList<T> list, Func<T, bool> selector)
  T LastOrDefault(this IList<T> list, Func<T, bool> selector)

Operators optimized for IList<T> from EnumerableEx (Rx):
  IList<T> Repeat<T>(this IList<T> list, int count)
  IList<TResult> Zip<TFirst, TSecond, TResult>(this IList<TFirst> first, 
IList<TSecond> second, Func<TFirst, TSecond, TResult> zipper)
  IList<T> Memoize<T>(this IList<T> list)
  IList<T> MemoizeAll<T>(this IList<T> list)

Sources optimized for IList<T> from EnumerableEx (Rx):
  IList<T> Return<T>(T source)
  IList<T> Repeat<T>(T source, int count)
  IList<T> Concat<T>(params IList<T>[] others)
  IList<T> Concat<T>(IList<IList<T>> lists)
  IList<T> Generate<T>(int count, Func<T> generator)
  IList<T> Generate<T>(int count, Func<int, T> generator)

My own sequence/list operators:
 Zip (3-argument version):
  IEnumerable<TResult> Zip<TFirst, TSecond, TThird, TResult>(this 
IEnumerable<TFirst> first, IEnumerable<TSecond> second, 
IEnumerable<TThird> third, Func<TFirst, TSecond, TThird, TResult> zipper)
  IList<TResult> Zip<TFirst, TSecond, TThird, TResult>(this IList<TFirst> 
first, IList<TSecond> second, IList<TThird> third, Func<TFirst, TSecond, 
TThird, TResult> zipper)
 Flatten:
  IEnumerable<T> Flatten<T>(this IEnumerable<IEnumerable<T>> list)
  IList<T> FlattenList<T>(this IList<IList<T>> list)
 Select (bidirectional projection):
  IList<TResult> Select<TSource, TResult>(this IList<TSource> list, 
Func<TSource, TResult> selector, Func<TResult, TSource> reverseSelector)
 Slice:
  IList<T> Slice<T>(this IList<T> list, int offset, int count)
  IList<T> Step<T>(this IList<T> list, int step)
 CopyBackward:
  void CopyBackward<T>(this IList<T> list, int index, IList<T> 
destination, int destinationIndex, int count)

Original issue reported on code.google.com by stephena...@gmail.com on 20 Nov 2009 at 3:29

GoogleCodeExporter commented 8 years ago
I think this refers to stuff from Nito.LINQ:
http://nitolinq.codeplex.com/

Original comment by azizatif on 25 May 2012 at 4:58

GoogleCodeExporter commented 8 years ago
This issue has been migrated to:
https://github.com/MoreLINQ/morelinq/issues/32
The conversation continues there.
DO NOT post any further comments to the issue tracker on Google Code as it is 
shutting down.
You can also just subscribe to the issue on GitHub to receive notifications of 
any further development.

Original comment by azizatif on 21 Aug 2015 at 6:55