From 5a2758b50d48d96a64489e75842912129e23dee9 Mon Sep 17 00:00:00 2001 From: Simon Forman Date: Sat, 19 Dec 2020 23:37:39 -0800 Subject: [PATCH] Derp! I forgot to modify the built-in defs to use "==". --- joy/library.py | 76 +++++++++++++++++++++++++------------------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/joy/library.py b/joy/library.py index 2409954..5d778d6 100644 --- a/joy/library.py +++ b/joy/library.py @@ -108,44 +108,44 @@ def add_aliases(D, A): definitions = ('''\ -? dup truthy -*fraction [uncons] dip uncons [swap] dip concat [*] infra [*] dip cons -*fraction0 concat [[swap] dip * [*] dip] infra -anamorphism [pop []] swap [dip swons] genrec -average [sum 1.0 *] [size] cleave / -binary nullary [popop] dip -cleave fork [popd] dip -codireco cons dip rest cons -dinfrirst dip infra first -unstack ? [uncons ?] loop pop -down_to_zero [0 >] [dup --] while -dupdipd dup dipd -enstacken stack [clear] dip -flatten [] swap [concat] step -fork [i] app2 -gcd 1 [tuck modulus dup 0 >] loop pop -ifte [nullary not] dipd branch -ii [dip] dupdip i -least_fraction dup [gcd] infra [div] concat map -make_generator [codireco] ccons -nullary [stack] dinfrirst -of swap at -pam [i] map -tailrec [i] genrec -product 1 swap [*] step -quoted [unit] dip -range [0 <=] [1 - dup] anamorphism -range_to_zero unit [down_to_zero] infra -run [] swap infra -size 0 swap [pop ++] step -sqr dup mul -step_zero 0 roll> step -swoncat swap concat -tailrec [i] genrec -ternary unary [popop] dip -unary nullary popd -unquoted [i] dip -while swap [nullary] cons dup dipd concat loop +? == dup truthy +*fraction == [uncons] dip uncons [swap] dip concat [*] infra [*] dip cons +*fraction0 == concat [[swap] dip * [*] dip] infra +anamorphism == [pop []] swap [dip swons] genrec +average == [sum 1.0 *] [size] cleave / +binary == nullary [popop] dip +cleave == fork [popd] dip +codireco == cons dip rest cons +dinfrirst == dip infra first +unstack == ? [uncons ?] loop pop +down_to_zero == [0 >] [dup --] while +dupdipd == dup dipd +enstacken == stack [clear] dip +flatten == [] swap [concat] step +fork == [i] app2 +gcd == 1 [tuck modulus dup 0 >] loop pop +ifte == [nullary not] dipd branch +ii == [dip] dupdip i +least_fraction == dup [gcd] infra [div] concat map +make_generator == [codireco] ccons +nullary == [stack] dinfrirst +of == swap at +pam == [i] map +tailrec == [i] genrec +product == 1 swap [*] step +quoted == [unit] dip +range == [0 <=] [1 - dup] anamorphism +range_to_zero == unit [down_to_zero] infra +run == [] swap infra +size == 0 swap [pop ++] step +sqr == dup mul +step_zero == 0 roll> step +swoncat == swap concat +tailrec == [i] genrec +ternary == unary [popop] dip +unary == nullary popd +unquoted == [i] dip +while == swap [nullary] cons dup dipd concat loop ''' # #