Name

select — Select item from term

Synopsis

select ( term  TERM ,
  integer  ITEM ,
  any  DEFAULT );

Parameters

term TERM

integer ITEM

any DEFAULT

Description

Gets the i'th value of the term t. The first value has the index 0. The call select ([1, 2, 3], 1) thus returns 2. Returns the default if the index is invalid or the found value has a diffetent type that default.

Usage

  select (`hirn (true, false), 33, true) -> true