OSDN Git Service

Crude type checking.
authorsforman <sforman@hushmail.com>
Sun, 30 Jul 2023 22:42:55 +0000 (15:42 -0700)
committersforman <sforman@hushmail.com>
Sun, 30 Jul 2023 22:42:55 +0000 (15:42 -0700)
I forget why I was doing "not not" so I made it a little more clear.  In
practice this is regressive:  The built-in "isnt_bool" function should
be in the dictionary?  Or prohibit type checking and let the bugs flow?
Rely on inference to prevent bugs that would pass the non-checking
versions of the functions?  Hmm...

implementations/defs.txt

index c211788..f4682da 100644 (file)
@@ -126,6 +126,8 @@ _mape popd reverse
 _map0 [_map1] dipd _map2
 _map1 stackd shift
 _map2 [infrst] cons dipd roll< swons
-_\/_ [not not] [not] branch
-/\ [not not] ii [pop false] [] branch
-\/ [not not] ii [] [pop true] branch
\ No newline at end of file
+_isnt_bool not not
+_isnt_two_bools [_isnt_bool] ii
+_\/_ [_isnt_bool] [not] branch
+/\ _isnt_two_bools [pop false] [] branch
+\/ _isnt_two_bools [] [pop true] branch