## Given one or more names, create a Key that contains them first to last. .sub create_nested_key .param string name .param pmc other_names :slurpy .local pmc key key = new .Key key = name $I0 = other_names if $I0 goto nested .return (key) nested: .local pmc tail tail = create_nested_key(other_names :flat) push key, tail .return (key) ret: .end .sub test :main .local pmc some_key some_key = create_nested_key( 'A', 'Nested', 'Namespace' ) ## some_key = new .Key $S0 = typeof some_key print $S0 print ': ' print some_key $P1 = shift some_key next: if null $P1 goto end print ' => ' print $P1 $P1 = shift $P1 goto next end: print "\n" .end