Selected graph algorithms in Groovy