first

return the first item of the given collection


Parameters

first collection :string :block :range

Attributes

n:integerget first *n* items

Returns

  • :null
  • :any

Examples

copy
print first "this is some text" ; t print first ["one" "two" "three"] ; one

copy
print first.n:2 ["one" "two" "three"] ; one two

Related