- r
- This is the the function rev which reverses a list
r [1,2,3] = [3,2,1]
- p
- This function is simply append with the arguments reversed.
p [1,2,3] [4,5,6] = [4,5,6,1,2,3]
- dr
- This may be used to reduce a string of decimal digits to a single
number. If the elements of the input list are not between 0 and 9 the
output is less obvious.
dr [3, 6, 2] = 263
- m
- This is the member function, m x l returns true if x is in
the list l, otherwise it returns false.
m 3 [2,6,7] = false
m 3 [2,3,6,7] = true
m 3 [3,3,3,3] = true
- n
- n x l returns true if all of the elements of l are
equal to x.
n 3 [2,6,7] = false
n 3 [2,3,6,7] = false
n 3 [3,3,3,3] = true
- im
- This is implode
im ["a", "b", "c"] = "abc"
- ts
- This is tospace it returns the elements of l upto the first
(single) space.
ts(explode "One fine day") = ["O","n","e"] : string list