Language 84

File

language84-0.3/source/graph_test.84

main

Where

Let (main args)
    Let MAP
        (SEARCH.MAP Z.compare
            Func {key _}. key)
    In
    Let G (GRAPH.G MAP)
    Let g
        (LIST.reduce
            [
                {0 [3 1]}
                {1 [2 0 5]}
                {2 [3]}
                {3 [2 4]}
            ]
            MAP.empty
            MAP.insert)
    In
    (LIST.for_each (G.strongly_connected_components g)
        Func c. (STDIO.print_line (STRING.join " " (LIST.map c Z.show))))

Where

Let GRAPH Package "graph"
Let LIST Package "list"
Let SEARCH Package "search"
Let STDIO Package "stdio"
Let STRING Package "string"
Let Z Package "z"