[next][previous][up][top][index]
search for:

select(BasicList,Function) -- select elements from a list

Synopsis:

  • Function: select -- select elements from a list or hash table
  • Input:
  • an instance of class BasicList.
  • an instance of class Function.
  • Output:
  • an instance of class BasicList.
  • select(v,f) -- select elements of the list v that yield true when the function f is applied.

    The order of the elements in the result will be the same as in the original list v, and the class will be the same, too.

    i1 : select({1,2,3,4,5}, odd)

    o1 = {1, 3, 5}

    o1 : List
    i2 : select([1,2,3,4,5], odd)

    o2 = [1, 3, 5]

    o2 : Array


    [next][previous][up][top][index]
    search for: