Converting SCC Kosaraju implementation from Java to Groovy.