$locator = -> $root, $x, $y { $root.[$x]{$y}[3] } $obj.$locator(42,"baz") # $obj[42][3] $locator = { . } $obj.$locator # $obj