Open
Description
Ion 1.1 allows templates to declare that a given template parameter accepts a group of expressions rather than a single one. For example:
// Definition
// The "hobbies" parameter accepts an expression group; in text,
// the group is delimited by an enclosing `[]`.
(macro person (name [hobbies])
{name: name, hobbies: (make_list hobbies))
// Invocation
(:person "Kunal" ["Bungee jumping", "Baking", "Bird watching"])
// Expansion
{
name: "Kunal",
hobbies: [
"Bungee jumping",
"Baking",
"Bird watching"
]
}
Metadata
Metadata
Assignees
Type
Projects
Status
Done