Named Tuple with non-alphanumeric fields
macro t(name)
print "%s %s\n" % {typeof({{name}}), {{name}}}
end
h = {a: 1, "a b-23": 2}
t h
h.each { |x, y|
t x
t y
}
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
macro t(name)
print "%s %s\n" % {typeof({{name}}), {{name}}}
end
h = {a: 1, "a b-23": 2}
t h
h.each { |x, y|
t x
t y
}