diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/test.ts | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/test/test.ts b/test/test.ts index 672fb4e..5e884ab 100644 --- a/test/test.ts +++ b/test/test.ts @@ -1,4 +1,4 @@ -import { createFn } from "../src"; +import { _Evaluate, createFn } from "../src"; const KS_boolToBin = "fn(b, ?(b, 1, 0))"; @@ -6,5 +6,10 @@ const boolArrToBinaryArr = createFn<[boolean[]]>()( `fn(boolArr, map(boolArr, ${KS_boolToBin}))` ); -const result = boolArrToBinaryArr([true, false, true]); -console.log(result); +const factorial = createFn<[number]>()( + `bind(fac,fn(n,?(eq(n, 1),n,mul(n,call(fac,sub(n,1))))))` +); + +const res = factorial(6); + +// console.log(factorial(2)); |
