This section lists some Tcl programs that might kids might have a some fun with, and learn something from. The code itself may be too complex for the beginner level, so should probably be elided until more proficiency is gained.
Write a procedure called "any" that is true when any items of one list are in another list, and false otherwise. In the example below, "are" and "fruits" are procedures
any {apples bananas oranges carrots} fruits
all
Write a procedure called "all" that is true when all items of one list are in another list, and false otherwise
all {apples bananas oranges carrots} fruits
which
Write a procedure called "which" whose value is a list of items from a list that pass a certain test.
which {apples bananas oranges carrots} fruits
are
Write a procedure called "are" whose value is a list containing "yes" or "no" for each item from from another list, depending on whether the item from the other list passed a specified test.