You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2019. It is now read-only.
tarcieri edited this page Feb 12, 2011
·
8 revisions
Lists are immutable and singly linked. A list literal looks like:
[1,2,3,4,5]
Instance methods
Note: work on List methods is ongoing.
List#[] → obj or nil
Ruby equivalent: Array#[]
Erlang equivalent: lists:nth/2, lists:seq/2
Implemented: partial
Notes: Currently only supports simple index lookups
Retrieve the nth element of a list.
List#all? [{|obj| block}] → true or false
Ruby equivalent: Enumerable#all?
Erlang equivalent: lists:all/2
Implemented: partial
Notes: Currently only supports lists:all/2 behavior
Passes each element of the collection to the given block. The method returns true if the block never returns false or nil. If the block is not given, an implicit block of {|obj| obj} is used (that is all? will return true only if none of the collection members are false or nil.)