C# Class clojure.lang.Range

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

Public Methods

Method 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 method

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
return System

Range() public method

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

Range() public method

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

count() public method

Gets the number of items in the collection.
public count ( ) : int
return int

first() public method

Gets the first item.
public first ( ) : object
return object

next() public method

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
return ISeq

reduce() public method

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.
return object

reduce() public method

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.
return object

withMeta() public method

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