|
LinkedHeadTail< T > | AddTo (LinkedHeadTail< T > list) |
| Adds the remaining elements in the Slinq to the specified LinkedHeadTail<T> and returns the result. More...
|
|
IC | AddTo< IC > (IC collection) |
| Adds the remaining elements in the Slinq to the specified collection and returns the collection. More...
|
|
Disposable< IC > | AddTo< IC > (Disposable< IC > collection) |
| Adds the remaining elements in the Slinq to the specified collection and returns the collection. More...
|
|
LinkedHeadTail< K, T > | AddTo< K > (LinkedHeadTail< K, T > list, DelegateFunc< T, K > selector) |
| Adds the remaining elements in the Slinq to the specified LinkedHeadTail<K, T> using the specified key selector and returns the result. More...
|
|
Lookup< K, T > | AddTo< K > (Lookup< K, T > lookup, DelegateFunc< T, K > selector) |
| Adds the remaining elements in the Slinq to the specified Lookup<K, T> using the specified key selector and returns the lookup. More...
|
|
LinkedHeadTail< K, T > | AddTo< K, P > (LinkedHeadTail< K, T > list, DelegateFunc< T, P, K > selector, P parameter) |
| Adds the remaining elements in the Slinq to the specified LinkedHeadTail<K, T> using the specified key selector and returns the result. More...
|
|
Lookup< K, T > | AddTo< K, P > (Lookup< K, T > lookup, DelegateFunc< T, P, K > selector, P parameter) |
| Adds the remaining elements in the Slinq to the specified Lookup<K, T> using the specified key selector and returns the lookup. More...
|
|
IC | AddTo< U, IC > (IC collection, DelegateFunc< T, U > selector) |
| Adds the remaining elements in the Slinq to the specified collection using the specified selector and returns the collection. More...
|
|
Disposable< IC > | AddTo< U, IC > (Disposable< IC > collection, DelegateFunc< T, U > selector) |
| Adds the remaining elements in the Slinq to the specified collection using the specified selector and returns the collection. More...
|
|
IC | AddTo< U, IC, P > (IC collection, DelegateFunc< T, P, U > selector, P parameter) |
| Adds the remaining elements in the Slinq to the specified collection using the specified selector and returns the collection. More...
|
|
Disposable< IC > | AddTo< U, IC, P > (Disposable< IC > collection, DelegateFunc< T, P, U > selector, P parameter) |
| Adds the remaining elements in the Slinq to the specified collection using the specified selector and returns the collection. More...
|
|
LinkedHeadTail< T > | AddToReverse (LinkedHeadTail< T > list) |
| Adds the remaining elements in the Slinq to the specified LinkedHeadTail<T> in reverse order and returns the result. More...
|
|
LinkedHeadTail< K, T > | AddToReverse< K > (LinkedHeadTail< K, T > list, DelegateFunc< T, K > selector) |
| Adds the remaining elements in the Slinq to the specified LinkedHeadTail<K, T> in reverse order using the specified key selector and returns the result. More...
|
|
LinkedHeadTail< K, T > | AddToReverse< K, P > (LinkedHeadTail< K, T > list, DelegateFunc< T, P, K > selector, P parameter) |
| Adds the remaining elements in the Slinq to the specified LinkedHeadTail<K, T> in reverse order using the specified key selector and returns the result. More...
|
|
T | Aggregate (DelegateFunc< T, T, T > selector) |
| Analog to Enumerable.Aggregate(). More...
|
|
U | Aggregate< U > (U seed, DelegateFunc< U, T, U > selector) |
| Analog to Enumerable.Aggregate(). More...
|
|
U | Aggregate< U, P > (U seed, DelegateFunc< U, T, P, U > selector, P parameter) |
| Analog to Enumerable.Aggregate(). More...
|
|
V | Aggregate< U, V > (U seed, DelegateFunc< U, T, U > selector, DelegateFunc< U, V > resultSelector) |
| Analog to Enumerable.Aggregate(). More...
|
|
Option< T > | AggregateOrNone (DelegateFunc< T, T, T > selector) |
| Analog to Enumerable.Aggregate(), but returns an option rather than throwing an exception if the Slinq is empty. More...
|
|
Option< T > | AggregateOrNone< P > (DelegateFunc< T, T, P, T > selector, P parameter) |
| Analog to Enumerable.Aggregate(), but returns an option rather than throwing an exception if the Slinq is empty. More...
|
|
U | AggregateWhile< U > (U seed, DelegateFunc< U, T, Option< U >> selector) |
| Aggregates elements from the Slinq while the selector returns a Some option. More...
|
|
U | AggregateWhile< U, P > (U seed, DelegateFunc< U, T, P, Option< U >> selector, P parameter) |
| Aggregates elements from the Slinq while the selector returns a Some option. More...
|
|
bool | All (DelegateFunc< T, bool > predicate) |
| Analog to Enumerable.All(). More...
|
|
bool | All< P > (DelegateFunc< T, P, bool > predicate, P parameter) |
| Analog to Enumerable.All(). More...
|
|
bool | Any () |
| Analog to Enumerable.Any(). More...
|
|
bool | Any (DelegateFunc< T, bool > predicate) |
| Analog to Enumerable.Any(). More...
|
|
bool | Any< P > (DelegateFunc< T, P, bool > predicate, P parameter) |
| Analog to Enumerable.Any(). More...
|
|
bool | Contains (T value) |
| Analog to Enumerable.Contains(). More...
|
|
bool | Contains (T value, IEqualityComparer< T > comparer) |
| Analog to Enumerable.Contains(). More...
|
|
int | Count () |
| Analog to Enumerable.Count(). More...
|
|
void | Dispose () |
| Sets the current value of the Slinq to None and releases any shared resources held by the Slinq. If the Slinq is empty this will have no effect. More...
|
|
T | ElementAt (int index) |
| Analog to Enumerable.ElementAt(). More...
|
|
T | ElementAtOrDefault (int index) |
| Analog to Enumerable.ElementAtOrDefault(). More...
|
|
Option< T > | ElementAtOrNone (int index) |
| Analog to Enumerable.ElementAt(), but returns an option rather than throwing an exception if the element does not exist. More...
|
|
T | First () |
| Analog to Enumerable.First(). More...
|
|
T | First (DelegateFunc< T, bool > predicate) |
| Analog to Enumerable.First(). More...
|
|
T | FirstOrDefault () |
| Analog to Enumerable.FirstOrDefault(). More...
|
|
T | FirstOrDefault (DelegateFunc< T, bool > predicate) |
| Analog to Enumerable.FirstOrDefault(). More...
|
|
Option< T > | FirstOrNone () |
| Analog to Enumerable.First(), but returns an option rather than throwing an exception if the Slinq is empty. More...
|
|
Option< T > | FirstOrNone (DelegateFunc< T, bool > predicate) |
| Analog to Enumerable.First(), but returns an option rather than throwing an exception if the Slinq is empty. More...
|
|
Option< T > | FirstOrNone< P > (DelegateFunc< T, P, bool > predicate, P parameter) |
| Analog to Enumerable.First(), but returns an option rather than throwing an exception if the Slinq is empty. More...
|
|
void | ForEach (DelegateAction< T > action) |
| Performs the specified action on each remaining element in the Slinq. More...
|
|
void | ForEach< P > (DelegateAction< T, P > action, P parameter) |
| Performs the specified action on each remaining element in the Slinq with the specified parameter. More...
|
|
T | Last () |
| Analog to Enumerable.Last(). More...
|
|
T | Last (DelegateFunc< T, bool > predicate) |
| Analog to Enumerable.Last(). More...
|
|
T | LastOrDefault () |
| Analog to Enumerable.LastOrDefault(). More...
|
|
T | LastOrDefault (DelegateFunc< T, bool > predicate) |
| Analog to Enumerable.LastOrDefault(). More...
|
|
Option< T > | LastOrNone () |
| Analog to Enumerable.Last(), but returns an option rather than throwing an exception if the Slinq is empty. More...
|
|
Option< T > | LastOrNone (DelegateFunc< T, bool > predicate) |
| Analog to Enumerable.Last(), but returns an option rather than throwing an exception if the Slinq is empty. More...
|
|
Option< T > | LastOrNone< P > (DelegateFunc< T, P, bool > predicate, P parameter) |
| Analog to Enumerable.Last(), but returns an option rather than throwing an exception if the Slinq is empty. More...
|
|
T | Max () |
| Analog to Enumerable.Max(). More...
|
|
Option< T > | MaxOrNone () |
| Analog to Enumerable.Max(), but returns an option rather than throwing an exception if the Slinq is empty and T is a value type. More...
|
|
Option< T > | MaxOrNone (IComparer< T > comparer) |
| Analog to Enumerable.Max(), but returns an option rather than throwing an exception if the Slinq is empty and T is a value type. More...
|
|
Option< T > | MaxOrNone (Comparison< T > comparison) |
| Analog to Enumerable.Max(), but returns an option rather than throwing an exception if the Slinq is empty and T is a value type. More...
|
|
Option< T > | MaxOrNone< K > (DelegateFunc< T, K > selector) |
| Analog to Enumerable.Max(), but returns an option rather than throwing an exception if the Slinq is empty and T is a value type. More...
|
|
Option< T > | MaxOrNone< K > (DelegateFunc< T, K > selector, IComparer< K > comparer) |
| Analog to Enumerable.Max(), but returns an option rather than throwing an exception if the Slinq is empty and T is a value type. More...
|
|
Option< T > | MaxOrNone< K > (DelegateFunc< T, K > selector, Comparison< K > comparison) |
| Analog to Enumerable.Max(), but returns an option rather than throwing an exception if the Slinq is empty and T is a value type. More...
|
|
Option< T > | MaxOrNone< K, P > (DelegateFunc< T, P, K > selector, P parameter) |
| Analog to Enumerable.Max(), but returns an option rather than throwing an exception if the Slinq is empty and T is a value type. More...
|
|
Option< T > | MaxOrNone< K, P > (DelegateFunc< T, P, K > selector, P parameter, IComparer< K > comparer) |
| Analog to Enumerable.Max(), but returns an option rather than throwing an exception if the Slinq is empty and T is a value type. More...
|
|
Option< T > | MaxOrNone< K, P > (DelegateFunc< T, P, K > selector, P parameter, Comparison< K > comparison) |
| Analog to Enumerable.Max(), but returns an option rather than throwing an exception if the Slinq is empty and T is a value type. More...
|
|
T | Min () |
| Analog to Enumerable.Min(). More...
|
|
Option< T > | Min (IComparer< T > comparer) |
| Analog to Enumerable.Min(), but returns an option rather than throwing an exception if the Slinq is empty and T is a value type. More...
|
|
Option< T > | MinOrNone () |
| Analog to Enumerable.Min(), but returns an option rather than throwing an exception if the Slinq is empty and T is a value type. More...
|
|
Option< T > | MinOrNone (Comparison< T > comparison) |
| Analog to Enumerable.Min(), but returns an option rather than throwing an exception if the Slinq is empty and T is a value type. More...
|
|
Option< T > | MinOrNone< K > (DelegateFunc< T, K > selector) |
| Analog to Enumerable.Min(), but returns an option rather than throwing an exception if the Slinq is empty and T is a value type. More...
|
|
Option< T > | MinOrNone< K > (DelegateFunc< T, K > selector, IComparer< K > comparer) |
| Analog to Enumerable.Min(), but returns an option rather than throwing an exception if the Slinq is empty and T is a value type. More...
|
|
Option< T > | MinOrNone< K > (DelegateFunc< T, K > selector, Comparison< K > comparison) |
| Analog to Enumerable.Min(), but returns an option rather than throwing an exception if the Slinq is empty and T is a value type. More...
|
|
Option< T > | MinOrNone< K, P > (DelegateFunc< T, P, K > selector, P parameter) |
| Analog to Enumerable.Min(), but returns an option rather than throwing an exception if the Slinq is empty and T is a value type. More...
|
|
Option< T > | MinOrNone< K, P > (DelegateFunc< T, P, K > selector, P parameter, IComparer< K > comparer) |
| Analog to Enumerable.Min(), but returns an option rather than throwing an exception if the Slinq is empty and T is a value type. More...
|
|
Option< T > | MinOrNone< K, P > (DelegateFunc< T, P, K > selector, P parameter, Comparison< K > comparison) |
| Analog to Enumerable.Min(), but returns an option rather than throwing an exception if the Slinq is empty and T is a value type. More...
|
|
void | Remove () |
| Removes the current element from the underlying sequence and moves the Slinq to the next element in the enumeration. If the Slinq is empty this will have no effect. More...
|
|
Slinq< T, C > | Remove (int count) |
| Enumerates up to the specified number of elements from the Slinq and removes them from the underlying sequence. More...
|
|
Slinq< T, C > | Remove (int count, DelegateAction< T > then) |
| Enumerates up to the specified number of elements from the Slinq and removes them from the underlying sequence. More...
|
|
Slinq< T, C > | Remove< P > (int count, DelegateAction< T, P > then, P thenParameter) |
| Enumerates up to the specified number of elements from the Slinq and removes them from the underlying sequence. More...
|
|
int | RemoveAll () |
| Enumerates the remaining elements from the Slinq, removes them from the underlying sequence, and returns the number of elements removed. More...
|
|
int | RemoveAll (DelegateAction< T > then) |
| Enumerates the remaining elements from the Slinq, removes them from the underlying sequence, and returns the number of elements removed. More...
|
|
int | RemoveAll< P > (DelegateAction< T, P > then, P thenParameter) |
| Enumerates the remaining elements from the Slinq, removes them from the underlying sequence, and returns the number of elements removed. More...
|
|
Slinq< T, C > | RemoveAndReturn () |
| Removes the current element from the underlying sequence, moves the Slinq to the next element in the enumeration, and returns the Slinq. If the Slinq is empty this will have no effect. More...
|
|
Slinq< T, C > | RemoveWhile (DelegateFunc< T, bool > predicate) |
| Enumerates elements from the Slinq and removes them from the underlying sequence while the specified predicate returns true. More...
|
|
Slinq< T, C > | RemoveWhile (DelegateFunc< T, bool > predicate, DelegateAction< T > then) |
| Enumerates elements from the Slinq and removes them from the underlying sequence while the specified predicate returns true. More...
|
|
Slinq< T, C > | RemoveWhile< P > (DelegateFunc< T, bool > predicate, DelegateAction< T, P > then, P thenParameter) |
| Enumerates elements from the Slinq and removes them from the underlying sequence while the specified predicate returns true. More...
|
|
Slinq< T, C > | RemoveWhile< P > (DelegateFunc< T, P, bool > predicate, P parameter) |
| Enumerates elements from the Slinq and removes them from the underlying sequence while the specified predicate returns true. More...
|
|
Slinq< T, C > | RemoveWhile< P > (DelegateFunc< T, P, bool > predicate, P parameter, DelegateAction< T > then) |
| Enumerates elements from the Slinq and removes them from the underlying sequence while the specified predicate returns true. More...
|
|
Slinq< T, C > | RemoveWhile< P, P2 > (DelegateFunc< T, P, bool > predicate, P parameter, DelegateAction< T, P2 > then, P2 thenParameter) |
| Enumerates elements from the Slinq and removes them from the underlying sequence while the specified predicate returns true. More...
|
|
U | RemoveWhile< U > (U seed, DelegateFunc< U, T, Option< U >> selector) |
| Aggregates elements from the Slinq and removes them from the underlying sequence while the specified selector returns a Some option. More...
|
|
U | RemoveWhile< U > (U seed, DelegateFunc< U, T, Option< U >> selector, DelegateAction< T > then) |
| Aggregates elements from the Slinq and removes them from the underlying sequence while the specified selector returns a Some option. More...
|
|
U | RemoveWhile< U, P > (U seed, DelegateFunc< U, T, Option< U >> selector, DelegateAction< T, P > then, P thenParameter) |
| Aggregates elements from the Slinq and removes them from the underlying sequence while the specified selector returns a Some option. More...
|
|
U | RemoveWhile< U, P > (U seed, DelegateFunc< U, T, P, Option< U >> selector, P parameter) |
| Aggregates elements from the Slinq and removes them from the underlying sequence while the specified selector returns a Some option. More...
|
|
U | RemoveWhile< U, P > (U seed, DelegateFunc< U, T, P, Option< U >> selector, P parameter, DelegateAction< T > then) |
| Aggregates elements from the Slinq and removes them from the underlying sequence while the specified selector returns a Some option. More...
|
|
U | RemoveWhile< U, P, P2 > (U seed, DelegateFunc< U, T, P, Option< U >> selector, P parameter, DelegateAction< T, P2 > then, P2 thenParameter) |
| Aggregates elements from the Slinq and removes them from the underlying sequence while the specified selector returns a Some option. More...
|
|
bool | SequenceEqual< C2 > (Slinq< T, C2 > other) |
| Analog to Enumerable.SequenceEqual(). More...
|
|
bool | SequenceEqual< C2 > (Slinq< T, C2 > other, EqualityComparer< T > equalityComparer) |
| Analog to Enumerable.SequenceEqual(). More...
|
|
bool | SequenceEqual< T2, C2 > (Slinq< T2, C2 > other, DelegateFunc< T, T2, bool > predicate) |
| Analog to Enumerable.SequenceEqual(). More...
|
|
T | Single () |
| Analog to Enumerable.Single(). More...
|
|
T | SingleOrDefault () |
| Analog to Enumerable.SingleOrDefault(). More...
|
|
Option< T > | SingleOrNone () |
| Analog to Enumerable.Single(), but returns an option rather than throwing an exception if the Slinq is empty or contains more than one element. More...
|
|
void | Skip () |
| Moves the Slinq to the next element in the enumeration. If the Slinq is empty this will have no effect. More...
|
|
Slinq< T, C > | Skip (int count) |
| Enumerates up to the specified number of elements from the Slinq. More...
|
|
void | SkipAll () |
| Enumerates the remaining elements of the Slinq. Useful if you want to force execution of the underlying chain. More...
|
|
Slinq< T, C > | SkipAndReturn () |
| Moves the Slinq to the next element in the enumeration and returns the Slinq. If the Slinq is empty this will have no effect. More...
|
|
Slinq< T, C > | SkipWhile (DelegateFunc< T, bool > predicate) |
| Enumerates elements from the Slinq while the specified predicate returns true. More...
|
|
Slinq< T, C > | SkipWhile< P > (DelegateFunc< T, P, bool > predicate, P parameter) |
| Enumerates elements from the Slinq while the specified predicate returns true. More...
|
|
U | SkipWhile< U > (U seed, DelegateFunc< U, T, Option< U >> selector) |
| Aggregates elements from the Slinq while the specified selector returns a Some option. More...
|
|
U | SkipWhile< U, P > (U seed, DelegateFunc< U, T, P, Option< U >> selector, P parameter) |
| Aggregates elements from the Slinq while the specified selector returns a Some option. More...
|
|
| Slinq (Mutator< T, C > skip, Mutator< T, C > remove, Mutator< T, C > dispose, C context) |
| Part of the internal API. More...
|
|
Smooth.Algebraics.Tuple
< LinkedHeadTail< T >
, LinkedHeadTail< T > > | SplitRight (int count) |
| Splits the remaining elements into a pair of lists, with the first list containing elements starting from the current position of the Slinq and the second list containing up to the last count elements from the end of the Slinq. More...
|
|
LinkedHeadTail< T > | ToLinked () |
| Converts the Slinq into a singly linked list. More...
|
|
LinkedHeadTail< K, T > | ToLinked< K > (DelegateFunc< T, K > selector) |
| Converts the Slinq into a singly linked key, value list using the specified key selector. More...
|
|
LinkedHeadTail< K, T > | ToLinked< K, P > (DelegateFunc< T, P, K > selector, P parameter) |
| Converts the Slinq into a singly linked key, value list using the specified key selector. More...
|
|
LinkedHeadTail< T > | ToLinkedReverse () |
| Converts the Slinq into an order-reversed singly linked list. More...
|
|
LinkedHeadTail< K, T > | ToLinkedReverse< K > (DelegateFunc< T, K > selector) |
| Converts the Slinq into an order-reversed singly linked key, value list using the specified key selector. More...
|
|
LinkedHeadTail< K, T > | ToLinkedReverse< K, P > (DelegateFunc< T, P, K > selector, P parameter) |
| Converts the Slinq into an order-reversed singly linked key, value list using the specified key selector. More...
|
|
List< T > | ToList () |
| Converts the Slinq into a List<T> borrowed from ListPool<T>. More...
|
|
Lookup< K, T > | ToLookup< K > (DelegateFunc< T, K > selector) |
| Converts the Slinq into a lookup using the specified key selector. More...
|
|
Lookup< K, T > | ToLookup< K > (DelegateFunc< T, K > selector, IEqualityComparer< K > comparer) |
| Converts the Slinq into a lookup using the specified key selector and equality comparer. More...
|
|
Lookup< K, T > | ToLookup< K, P > (DelegateFunc< T, P, K > selector, P parameter) |
| Converts the Slinq into a lookup using the specified key selector and equality comparer. More...
|
|
Lookup< K, T > | ToLookup< K, P > (DelegateFunc< T, P, K > selector, P parameter, IEqualityComparer< K > comparer) |
| Converts the Slinq into a lookup using the specified key selector and equality comparer. More...
|
|
Allocation-free enumerator with advanced, LINQ-like functionality.
The basic operations on a Slinq are:
current, which is either a Some option containing the current value of the enumeration, or a None option if the enumeration is complete.
Skip, which moves the Slinq to the next element in the enumeration.
Remove, which removes the current element from the underlying representation and moves the Slinq to the next element in the enumeration.
Dispose, which cancels the remainder of the enumeration and releases any shared resources held by the Slinq.
If a Skip or Remove call completes the enumeration, any shared resources held by the Slinq will be released automatically. Dispose only needs to be called when abandoning an incomplete enumeration.
Slinq<T, C> and its extension classes define many operations inspired by Linq and functional programming languages such as Scala and F#.
Slinq methods that take delegate parameter(s) come in two forms, a basic version and a version that takes an additional, user defined parameter of generic type P. This extra parameter is passed to the delegate(s) in order to capture any state required for the operation without the need for a closure.
Note: Because Slinqs are value types, it is possible to backtrack to an earlier point in an enumeration by storing multiple copies of a Slinq. This is not supported and will lead to unspecified behavior.
If DETECT_BACKTRACK is defined in Smooth.Slinq.Context.BacktrackDetector, backtracking will be detected and throw an exception. This should only be used for debugging purposes as it will severely reduce performance.