Interface Sequence<T>
public interface Sequence<T>
-
Method Details
-
first
Return the first element of the sequence.- Returns:
- first element of the sequence if defined otherwise Nil
-
rest
-
cons
Construct a new immutable list by adding the new front item to the existing sequence.- Parameters:
item
- item to add to the sequencesequence
- sequence where the item will be added in the front of the sequence- Returns:
- new immutable list
-