LanguageExt.Core

LanguageExt.Core Traits Range

Contents

interface Range <SELF, NumOrdA, A> Source #

where SELF : Range<SELF, NumOrdA, A>
where NumOrdA : Ord<A>, Num<A>

Properties

property A From Source #

First value in the range

property A To Source #

Last (inclusive) value in the range

property A Step Source #

Step size to the next item in the range

property bool StepIsAscending Source #

True if adding Step to n makes the resulting value greater than n

property object? Case Source #

Reference version for use in pattern-matching

Methods

method SELF New (A from, A to, A step) Source #

method SELF FromMinMax (A min, A max, A step) Source #

Construct a new range

Parameters

param from

The minimum value in the range

param to

The maximum value in the range

param step

The size of each step in the range

method SELF FromCount (A min, A count, A step) Source #

Construct a new range

Parameters

param from

The minimum value in the range

param count

The number of items in the range

param step

The size of each step in the range

method bool InRange (A value) Source #

Returns true if the value provided is in range

Parameters

param value

Value to test

returns

True if the value provided is in range

method bool Overlaps (SELF other) Source #

Returns true if the range provided overlaps this range

Parameters

param other

The range to test

returns

True if the range provided overlaps this range

method Seq<A> ToSeq () Source #

method Iterable<A> AsIterable () Source #

method S Fold <S> (S state, Func<S, A, S> f) Source #