|
For example,
is a function that counts the leaves on a tree (including the nils at the ends of lists).
flattens a tree into a list of its leaves (including nils).
sums up all the numbers in a tree, ignoring things that aren't numbers.
counts the height of a tree.
I hope that you can figure out other uses by analogy. More systematically, the first argument to Try to find two very simple arguments to It would be great if other people would post amusing examples. Mike O'D. |
reduce and reduce-tree question by Michael C. Brizic, 2000, Nov 18
tree args by dave, 2000, Nov 18
reduce-tree doesn't apply to trees, but it's output does by Mike O'Donnell, 2000, Nov 18
Another question on #2 by Ben Johnson, 2000, Nov 19
Your reduce equivalent to mine, test it with identity by Mike O'Donnell, 2000, Nov 19
to: