add enum type (generalization of sum-type)

This commit is contained in:
Joeri Exelmans 2025-04-17 16:10:00 +02:00
parent 8653bb99c6
commit 0b262daf7f
6 changed files with 102 additions and 7 deletions

View file

@ -42,4 +42,8 @@ export function zip(a, b) {
return a.map((k, i) => [k, b[i]]);
}
export function capitalizeFirstLetter(val) {
return String(val).charAt(0).toUpperCase() + String(val).slice(1);
}