Open ThierryBleau opened 3 years ago
Syntax candidate
//type user: [ Profile({name: string, age: int}), Anon(int) , Mod]; // visitor: [Profile(_), Anon(_), Mod] let visitor = Anon(0); // f: [Profile(_), Anon(_), Mod ] => string let f = (x) => switch (x) { | Profile(_) => "profile" | Anon(_) => "anon" | Mod => "mod" }
Syntax candidate