nxt.range_ex

Extensions to std.range.

Public Imports

nxt.slicing
public import nxt.slicing;
Undocumented in source.

Members

Aliases

isSortedRange
alias isSortedRange(R) = isInstanceOf!(SortedRange, R)
Undocumented in source.
items
alias items = pairs
Undocumented in source.
pullBack
alias pullBack = backPop
Undocumented in source.
pullFront
alias pullFront = frontPop
Undocumented in source.
stealBack
alias stealBack = backPop
Undocumented in source.
stealFront
alias stealFront = frontPop
Undocumented in source.
takeBack
alias takeBack = backPop
Undocumented in source.
takeFront
alias takeFront = frontPop
Undocumented in source.

Enums

hasPureCopy
eponymoustemplate hasPureCopy(T)
Undocumented in source.
hasStealableElements
eponymoustemplate hasStealableElements(R)
Undocumented in source.

Functions

adjacentPairs
auto adjacentPairs(R r)
Undocumented in source. Be warned that the author may not have intended to support it.
adjacentTriples
auto adjacentTriples(R r)
Undocumented in source. Be warned that the author may not have intended to support it.
adjacentTuples
auto adjacentTuples(R r)

Return: Adjacent N-Tuples of r.

asTuple
auto asTuple(T[n] arr)

Return Static Array arr as a Tuple.

backPop
ElementType!R backPop(R r)

Steal back from r destructively and return it.

frontPop
ElementType!R frontPop(R r)

Steal front from r destructively and return it.

iotaOf
auto iotaOf(B begin, E end, S step)

Same as iota but with explicit conversion to type T.

iotaOfExceptional
auto iotaOfExceptional(B begin, E end, S step)
Undocumented in source. Be warned that the author may not have intended to support it.
pairs
auto pairs(Value[Key] aa)

Return Array of Key-Value Pairs of Associative Array aa. * * See_Also: https://github.com/D-Programming-Language/druntime/pull/574 * See_Also: http://forum.dlang.org/thread/dxotcrutrlmszlidufcr@forum.dlang.org?page=2#post-fhkgitmifgnompkqiscd:40forum.dlang.org

rangify
auto rangify(T range)
Undocumented in source. Be warned that the author may not have intended to support it.
slidingSplitter
auto slidingSplitter(R data, size_t lower)
Undocumented in source. Be warned that the author may not have intended to support it.
slidingSplitter
auto slidingSplitter(R data, size_t lower, size_t upper)
Undocumented in source. Be warned that the author may not have intended to support it.
staticLengthRange
auto staticLengthRange(T[n] arr)

Overload has questionable memory safety. Would be quite cool if DIP-1000 could support this use case

staticLengthRange
auto staticLengthRange(R range)
Undocumented in source. Be warned that the author may not have intended to support it.
zip
auto zip(R1 r1, R2 r2)

Faster than std.range.zip on DMD.

Structs

RingBuffer
struct RingBuffer(T)

Ring Buffer.

S
struct S
Undocumented in source.
SlidingSplitter
struct SlidingSplitter(Range)

Sliding Splitter.

Templates

CommonElementType
template CommonElementType(Rs...)

Is the CommonType of the ElementTypes of the ranges Rs.

genTypeList
template genTypeList(T, size_t n)
isSortedRange_alt
template isSortedRange_alt(R)

True if R is a SortedRange

sortingPredicate
template sortingPredicate(Range, alias fallbackPred = "a < b")

Given a SortedRange R, sortingPredicate!R(a, b) will call in to the * predicate that was used to create the SortedRange. * * Params: * Range = the range to extract the predicate from * fallbackPred = the sorting predicate to fallback to if Range is not a SortedRange

Variables

haveCommonElementType
enum bool haveCommonElementType(Types...);
Undocumented in source.

Meta