Functional Code
lBasic idea:
lAs long as there is a leaf:
Remove leaves and their attached
arcs
lTranslation:
lisAcyclic(Graph) =
null(iterate(removeLeaves,
hasLeaf, Graph));
iterate first arg.
as long as
second arg. true
remove all leaves and their arcs
test whether there is a leaf