Let's say I would like to create a macro of this kind:
m(1, k) would produce:
match(k)
{
| 1 => 2
| _ => 0
}
m(2, k) would produce:
match(k)
{
| 1 => 2
| 2 => 3
| _ => 0
}
and so on. Although construction like <[ $i => $(i + 1) ]> for the possible match is accepted, I do not know how to create match expression consisting of these. The example is of course contrived ;)
http://nemerle.org/Macros_tutorial#Matching_match-cases