Closed gvergnaud closed 1 year ago
The idea is to turn the args, arg0, arg{n} keywords into functions. This has 2 benefits:
args, arg0, arg{n}
type res1 = Eval< Tuples.Reduce<args, [], [1, 2, 3]> > // => [[[[], 1], 2], 3] type res2 = Eval< Tuples.ZipWith<args, ['a', 'b', 'c'], [1, 2, 3]> > // => [['a', 1], ['b', 2], ['c', 3]]
type res1 = Call< // ^? Objects.Create<{ addition: Numbers.Add<10, _>; division: Numbers.Div<_, 2>; nested: [Numbers.GreaterThan<0>]; recursion: Functions.ComposeLeft< [ Objects.Create<{ label: Strings.Prepend<"number: ">; content: Strings.Append<" is the number we got!">; }>, Objects.Create<{ post: arg0; }> ] >; }>, 10 >; type test2 = Expect< Equal< res1, { addition: 20; division: 5; nested: [true]; recursion: { post: { label: "number: 10"; content: "10 is the number we got!"; }; }; } > >;
Motivation
The idea is to turn the
args, arg0, arg{n}
keywords into functions. This has 2 benefits: