carbon.range

このモジュールは、標準ライブラリのstd.rangeを強化します。

Members

Enums

isRangeOfRanges
eponymoustemplate isRangeOfRanges(R, alias I = isInputRange)

true if both isInputRange!R and isInputRange!R are true.

isSimpleRange
eponymoustemplate isSimpleRange(R, alias I = isInputRange)

true if isInputRange!R is true and isInputRange!R is false.

Functions

concat
auto concat(R range)
R concat(R range)

concats elements

flatten
auto flatten(R r)
giota
auto giota(S start, E end, D diff)

std.range.iotaを汎用的にしたものです.

giotaInf
auto giotaInf(S start, D diff)

ditt

resampling
auto resampling(R range, size_t n)

受け取ったレンジの要素をそれぞれ連続してn回繰り返すようなレンジを返します。

takeWhile
auto takeWhile(R range, T args)

Haskell等の言語でのtakeWhileの実装です。 この実装では、predは任意個数の引数を取ることができます。 たとえば、2引数関数の場合、第一引数にはレンジの先頭の値が、第二引数にはレンジの次の値が格納されます。

whenEmpty
auto whenEmpty(R range)
Undocumented in source. Be warned that the author may not have intended to support it.
whenEmpty
auto whenEmpty(R range, Fn fn)
Undocumented in source. Be warned that the author may not have intended to support it.

Templates

SegmentType
template SegmentType(size_t N, R)

あるレンジのN個の連続する要素のリストを返します。

dsegment
template dsegment(Range)

Dynamic Array Segment

segment
template segment(size_t N : 1, Range)
template segment(size_t N, Range)

あるレンジのN個の連続する要素のリストを返します。

Meta