next up previous contents
Next: Function definition Up: Control Structures and programming Previous: for   Contents

map function

map function is used to apply an operator to each element of a given array. For example, the following line is used to translate each polynomial of the given array aa into the corresponding string

          /aa [( (x-1)^2 ). (2^10).] def
          aa { (string) dc } map /ff set ;
          ff ::
It becomes easier to writing script for kan/sm1 by using the map function.



root 2004-03-05