jckarter/clay — Issue #43: change variant match function to use CallDefined?
Author: jckarter
Created: 2011-12-11 18:39:40+00:00
State: open
Labels: library-feature, v0.1

Instead of interleaving the instance types and lambdas:

```
match(variant, Inst1, i1 -> { .. }, Inst2, i2 -> { .. });
```

The match function would be cleaner if it dispatched matching based on the lambda signature:

```
match(variant, (i1:Inst1) -> { .. }, (i2:Inst2) -> { .. });
```

which would look nice with block syntax:

```
match(variant): (i1:Inst1) -> {
..
}, (i2:Inst2) -> {
..
}
```