I noticed a problem with the binary-tree
walk subroutine, so I'm reposting both corrected versions.
subroutine walk given: Node tree returns: List values if not empty tree: push values, filter not empty, walk tree.left, tree.value, walk tree.right return values
subroutine walk given: Node tree returns: List values if not empty tree: List left ← walk tree.left List right ← walk tree.right push values, filter not empty, left, tree.value, right return values
filter function applies the
Boolean subroutine to each item in a
List and returns only those for which its results are
Some command and functions for dealing with empty variables.
Removes the contents of a variable and makes it empty.
Boolean bool ← empty variable
Determines if a variable is empty and returns
TRUEif it is,
FALSEif it isn't. This is the opposite of
Boolean bool ← filled variable
Determines if a variable has content and returns
TRUEif it has,
FALSEif it doesn't. This is the opposite of