• R/O
  • HTTP
  • SSH
  • HTTPS

Thun: Commit

Interpreter and library.


Commit MetaInfo

Révision9fe565a929d6fd260a1efb430f815b729a740a91 (tree)
l'heure2022-04-06 02:06:40
AuteurSimon Forman <sforman@hush...>
CommiterSimon Forman

Message de Log

uncons as basis

- clear deletes stack at once, not in a loop
- make uncons basis and define first and rest in tems of it

Change Summary

Modification

--- a/implementations/Nim/defs.txt
+++ b/implementations/Nim/defs.txt
@@ -83,13 +83,14 @@ split_list [take reverse] [drop] clop
8383 sqr dup *
8484 stackd [stack] dip
8585 step_zero 0 roll> step
86+stuncons stack uncons
8687 sum [+] step_zero
8788 swapd [swap] dip
8889 swons swap cons
8990 swoncat swap concat
9091 sqr dup mul
9192 tailrec [i] genrec
92-take [] roll> [shift] times pop
93+take <<{} [shift] times pop
9394 ternary binary popd
9495 third rest second
9596 tuck dup swapd
--- a/implementations/defs.txt
+++ b/implementations/defs.txt
@@ -18,7 +18,7 @@ b [i] dip i
1818 binary unary popd
1919 ccccons ccons ccons
2020 ccons cons cons
21-clear stack bool [pop stack bool] loop
21+clear [] swaack pop
2222 cleave fork popdd
2323 clop cleave popdd
2424 codi cons dip
@@ -33,6 +33,7 @@ dupdd [dup] dipd
3333 dupdip dupd dip
3434 dupdipd dup dipd
3535 enstacken stack [clear] dip
36+first uncons pop
3637 flatten <{} [concat] step
3738 fork [i] app2
3839 fourth rest third
@@ -65,7 +66,7 @@ quoted [unit] dip
6566 range [0 <=] [1 - dup] anamorphism
6667 range_to_zero unit [down_to_zero] infra
6768 reco rest cons
68-rest [pop] infra
69+rest uncons popd
6970 reverse <{} shunt
7071 roll> swap swapd
7172 roll< swapd swap
@@ -95,7 +96,6 @@ ternary binary popd
9596 third rest second
9697 tuck dup swapd
9798 unary nullary popd
98-uncons [first] [rest] cleave
9999 unit [] cons
100100 unquoted [i] dip
101101 unswons uncons swap
Afficher sur ancien navigateur de dépôt.