failed attempts to intercept copy command when the cursor is in the empty text field...
[LeanCalc.git] / help / forall
1 NAME
2     forall - to evaluate a function for all values of a list or matrix
3
4 SYNOPSIS
5     forall(x, y)
6
7 TYPES
8     x           list or matrix
9     y           string
10
11     return      null value
12
13 DESCRIPTION
14     In forall(x,y), y is the name of a function; that function
15     is performed in succession for all elements of x.  This is similar
16     to modify(x, y) but x is not changed.
17
18 EXAMPLE
19     > global n = 0
20     > define s(a) {n += a;}
21     > A = list(1,2,3,4)
22     > forall(A, "s")
23     > n
24             10
25
26     > define e(a) {if (iseven(a)) print a;}
27     > forall(A, "e")
28             2
29             4
30
31 LIMITS
32     none
33
34 LINK LIBRARY
35     none
36
37 SEE ALSO
38     modify
39