Algorithm.each

Enumerates all entries of an enumerable. To change entries while enumerating, eachIter should be used instead.

Arguments

The

enumerable
, can be a Container, a Range, or a builtin-list.
The
callable
to be called for each entry. It has the following stack notation:

( value -- )

Each entry will be provided as input

value
to the callable.

Return values

None

Complexity

Depends on the enumerable and the callable.

Example

"sl/algorithm" useFile "sl/linkedList" useFile a: (1 2 3) makeList; (4 5 6) a append a [print "," print] each
Output:
1,2,3,4,5,6,