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));

test
for
empty
list
iterate first arg.
as long as
second arg. true
remove all leaves and their arcs
test whether there is a leaf
starting
graph