diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/test.ts | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/test.ts b/test/test.ts index 89697fe..672fb4e 100644 --- a/test/test.ts +++ b/test/test.ts @@ -1,6 +1,10 @@ import { createFn } from "../src"; -const adder = createFn("fn(x, map(arr(10,20,30), fn(y, add(x, y))))"); +const KS_boolToBin = "fn(b, ?(b, 1, 0))"; -const result = adder(5); +const boolArrToBinaryArr = createFn<[boolean[]]>()( + `fn(boolArr, map(boolArr, ${KS_boolToBin}))` +); + +const result = boolArrToBinaryArr([true, false, true]); console.log(result); |
