diff options
author | Marvin Borner | 2024-03-23 19:18:16 +0100 |
---|---|---|
committer | Marvin Borner | 2024-03-23 19:18:16 +0100 |
commit | 7bfc78b122ad9cbb65eed16f7de4d4021547c2a8 (patch) | |
tree | e45a22aeddb12257a94e32083ed10dfa3a0da66e /std/Number.bruijn | |
parent | fc9980e5e19602748b8cc596cdd07c02ac2889f1 (diff) |
Some Project Euler solutions
Diffstat (limited to 'std/Number.bruijn')
-rw-r--r-- | std/Number.bruijn | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/std/Number.bruijn b/std/Number.bruijn index b2f3631..25a1f6c 100644 --- a/std/Number.bruijn +++ b/std/Number.bruijn @@ -9,9 +9,9 @@ # the following functions are only here because of recursive imports of list/ternary # converts number to list of its digits -number→list [=?0 {}(+0) (z [[rec]] 0)] ⧗ Number → (List Number) +number→list [=?0 {}(+0) <~>(z [[[rec]]] empty 0)] ⧗ Number → (List Number) rec =?0 case-end case-rec - case-rec (1 (0 / (+10))) ; (0 % (+10)) + case-rec &[[4 (0 : 3) 1]] (quot-rem 0 (+10)) case-end empty :test (number→list (+0)) ({}(+0)) |