Replace `[all]` with `_`
Closed this issue · 0 comments
mlhaufe commented
Given that a Data declaration requires variants to be ProperCase, _
can be used in Trait declarations without ambiguity:
const fib = Trait(undefined, {
[all]: (n) => n == 0 ? 0 :
n == 1 ? 1 :
fib(n-1) + fib(n-2)
})
becomes:
const fib = Trait(undefined, {
_: (n) => n == 0 ? 0 :
n == 1 ? 1 :
fib(n-1) + fib(n-2)
})