Update defs.

This commit is contained in:
Simon Forman 2024-04-01 16:24:18 -07:00
parent 8f039d8e3b
commit d44c33f397
3 changed files with 7 additions and 5 deletions

View File

@ -36,6 +36,7 @@ first
lshift
rshift
mod
stack
rest'''.splitlines()

View File

@ -216,7 +216,7 @@ init_defs(void)
def_dupd_body = text_to_expression("[dup] dip");
def_dupdipd_body = text_to_expression("dup dipd");
def_dupdip_body = text_to_expression("dupd dip");
def_enstacken_body = text_to_expression("stack [clear] dip");
def_enstacken_body = text_to_expression("[] swaack");
def_first_two_body = text_to_expression("uncons first");
def_flatten_body = text_to_expression("<{} [concat] step");
def_fork_body = text_to_expression("[i] app2");
@ -292,7 +292,7 @@ init_defs(void)
def_uncons_body = text_to_expression("[first] dupdip rest");
def_unit_body = text_to_expression("[] cons");
def_unquoted_body = text_to_expression("[i] dip");
def_unstack_body = text_to_expression("[[] swaack] dip swoncat swaack pop");
def_unstack_body = text_to_expression("[enstacken] dip swoncat swaack pop");
def_unswons_body = text_to_expression("uncons swap");
def_while_body = text_to_expression("swap nulco dupdipd concat loop");
def_x_body = text_to_expression("dup i");

View File

@ -24,7 +24,7 @@ binary unary popd
ccccons ccons ccons
ccons cons cons
choice [pop] [popd] branch
clear [] swaack pop
clear enstacken pop
cleave fork popdd
clop cleave popdd
cmp [[>] swap] dipd [ifte] ccons [=] swons ifte
@ -42,7 +42,7 @@ dupdd [dup] dipd
dupd [dup] dip
dupdipd dup dipd
dupdip dupd dip
enstacken stack [clear] dip
enstacken [] swaack
first uncons pop
first_two uncons first
flatten <{} [concat] step
@ -106,6 +106,7 @@ spiral_next [[[abs] ii <=] [[<>] [pop !-] or] and] [[!-] [[++]] [[--]] ifte dip]
split_at [drop] [take] clop
split_list [take reverse] [drop] clop
sqr dup mul
stack enstacken dup cons swaack pop
stackd [stack] dip
step_zero 0 roll> step
stuncons stack uncons
@ -123,7 +124,7 @@ unary nullary popd
uncons [first] dupdip rest
unit [] cons
unquoted [i] dip
unstack [[] swaack] dip swoncat swaack pop
unstack [enstacken] dip swoncat swaack pop
unswons uncons swap
while swap nulco dupdipd concat loop
x dup i