C# Class clojure.lang.Range

Represents a (contiguous) range of integers.
Inheritance: clojure.lang.ASeq, IReduce, Streamable, Counted
Afficher le fichier Open project: richhickey/clojure-clr Class Usage Examples

Méthodes publiques

Méthode Description
Range ( IPersistentMap meta, int start, int end ) : System

Initialize a range and attach metadata.

Range ( int start, int end ) : System

Initialize a range.

Range ( object start, object end ) : System

Initialize a range.

Needed to interface with core.clj

count ( ) : int

Gets the number of items in the collection.

first ( ) : object

Gets the first item.

next ( ) : ISeq

Return a seq of the items after the first. Calls seq on its argument. If there are no more items, returns nil."

reduce ( IFn f ) : object

Reduce the collection using a function.

Computes f(...f(f(f(i0,i1),i2),i3),...).

reduce ( IFn f, object start ) : object

Reduce the collection using a function.

Computes f(...f(f(f(start,i0),i1),i2),...).

withMeta ( IPersistentMap meta ) : IObj

Create a copy with new metadata.

Method Details

Range() public méthode

Initialize a range and attach metadata.
public Range ( IPersistentMap meta, int start, int end ) : System
meta IPersistentMap The metadata to attach.
start int Start value
end int End value
Résultat System

Range() public méthode

Initialize a range.
public Range ( int start, int end ) : System
start int Start value
end int End value
Résultat System

Range() public méthode

Initialize a range.
Needed to interface with core.clj
public Range ( object start, object end ) : System
start object Start value
end object End value
Résultat System

count() public méthode

Gets the number of items in the collection.
public count ( ) : int
Résultat int

first() public méthode

Gets the first item.
public first ( ) : object
Résultat object

next() public méthode

Return a seq of the items after the first. Calls seq on its argument. If there are no more items, returns nil."
public next ( ) : ISeq
Résultat ISeq

reduce() public méthode

Reduce the collection using a function.
Computes f(...f(f(f(i0,i1),i2),i3),...).
public reduce ( IFn f ) : object
f IFn The function to apply.
Résultat object

reduce() public méthode

Reduce the collection using a function.
Computes f(...f(f(f(start,i0),i1),i2),...).
public reduce ( IFn f, object start ) : object
f IFn The function to apply.
start object An initial value to get started.
Résultat object

withMeta() public méthode

Create a copy with new metadata.
public withMeta ( IPersistentMap meta ) : IObj
meta IPersistentMap The new metadata.
Résultat IObj