2 ms·
BuckleScript (ReasonML's-to-JavaScript compiler) has an annotation that automatically creates functions from variant constructors. E.g.: [@bs.deriving {acc
by yawaramin 7y ago
BuckleScript (ReasonML's-to-JavaScript compiler) has an annotation that automatically creates functions from variant constructors. E.g.:
[@bs.deriving {accessors}]
type msg =
| Increment
| Decrement
| Reset
| Set(int);
let action = set(2);