variations(l)
This computes the number of sign changes in the ordered list l.
i1 : L = for i to 10 list random(-50,50) o1 = {-26, 15, 21, 22, -31, -31, 41, 22, 43, 29, 22} o1 : List
i2 : variations(L) o2 = 3
The object variations is a method function.