This and that.

This commit is contained in:
Simon Forman
2022-10-15 20:04:27 -07:00
parent 74f936efa0
commit ec5036bf63
2 changed files with 119 additions and 25 deletions
+3 -8
View File
@@ -32,14 +32,7 @@ clear
[add-digits initial-carry add-digits']
[initial-carry false rollup]
[add-digits' [P] [THEN] [R0] [R1] genrec]
[P [bool] ii & not]
[THEN [P'] [THEN'] [ELSE] ifte]
[R0 uncons-two [add-with-carry] dipd]
[R1 i cons]
[P' [bool] ii |]
[THEN' ditch-empty-list add-carry-to-digits]
[ELSE pop swap [] [1 swons] branch]
[same-sign [first] ii xor not]
[extract-sign [uncons] dip rest]
@@ -54,6 +47,8 @@ clear
[_btlc0.4 [uncons-two] [dipd] sandwich]
[_btlc0 _btlc0.3 _btlc0.4]
[_btlc1 [[ifte] ccons [P'] swons [P] swap] dip]
[P [bool] ii & not]
[P' [bool] ii |]
[carry [] [1 swons] branch]