// perform computations on the type level
// includes:
// Boolean: not, and, or, if
// Nat: +, -, *, /, %, sqrt, log2, gcd and comparisons
// Vector: mapping and appending
type Test = Sqrt<_10>; // Test === 3
const vec = cons(1, cons(2, cons(3, nil()))); // length is inferred to be 3
const mapped = vec.map(x => x + 1); // length stays 3
const vecDoubled = vec.append(vec); // length is 6
-
Notifications
You must be signed in to change notification settings - Fork 0
atennapel/ts-typelevel-computation
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published