#!/usr/bin/ruby

#
## This script is used for testing only
#

var tree = 'root':'child':'grandchild':'end';

while (true) {
    say tree.first;
    tree.second.is_a(Pair) || break;
    tree = tree.second;
}

say(
    Pair.new('root',
        Pair.new('child',
            Pair.new('grandchild', 'end')
        )
    )
)