# Pastebin OReK55oH $ perl6 -e ' my %config = (:y{ :out{ :a[1, 2], :b["a" .. "b"] } }); multi inflate-config(@path, %config) { for %config.kv -> Str $k, $v { inflate-config [|@path, $k], $v } } multi inflate-config(@path, @config) { for @config.kv -> Str(Int) $i, $v { inflate-config [|@path, $i], $v } } multi inflate-config(@path, $config) { take @path.join(".") => $config } .say for gather { inflate-config [], %config } ' y.out.a.0 => 1 y.out.a.1 => 2 y.out.b.0 => a y.out.b.1 => b