aboutsummaryrefslogtreecommitdiffhomepage
path: root/std/Number.bruijn
diff options
context:
space:
mode:
Diffstat (limited to 'std/Number.bruijn')
-rw-r--r--std/Number.bruijn20
1 files changed, 10 insertions, 10 deletions
diff --git a/std/Number.bruijn b/std/Number.bruijn
index c7cce1b..376f8f0 100644
--- a/std/Number.bruijn
+++ b/std/Number.bruijn
@@ -10,19 +10,19 @@
# negative trit indicating coeffecient of (-1)
t< [[[2]]]
-# returns whether a trit is negative
+# returns true if a trit is negative
t<? [0 true false false]
# positive trit indicating coeffecient of (+1)
t> [[[1]]]
-# returns whether a trit is positive
+# returns true if a trit is positive
t>? [0 false true false]
# zero trit indicating coeffecient of 0
t= [[[0]]]
-# returns whether a trit is zero
+# returns true if a trit is zero
t=? [0 false false true]
:test (t<? t<) (true)
@@ -127,7 +127,7 @@ mst [fix (last (list! %0))]
:test (mst (+1)) (t>)
:test (mst (+42)) (t>)
-# returns whether balanced ternary number is negative
+# returns true if balanced ternary number is negative
negative? [t<? (mst 0)]
<?( negative?
@@ -137,7 +137,7 @@ negative? [t<? (mst 0)]
:test (<?(+1)) (false)
:test (<?(+42)) (false)
-# returns whether balanced ternary number is positive
+# returns true if balanced ternary number is positive
positive? [t>? (mst 0)]
>?( positive?
@@ -147,7 +147,7 @@ positive? [t>? (mst 0)]
:test (>?(+1)) (true)
:test (>?(+42)) (true)
-# checks whether balanced ternary number is zero
+# checks true if balanced ternary number is zero
zero? [0 true [false] [false] I]
=?( zero?
@@ -287,7 +287,7 @@ ssub strip .. sub
:test (((+1) - (+2)) =? (-1)) (true)
:test (((+42) - (+1)) =? (+41)) (true)
-# returns whether number is greater than other number
+# returns true if number is greater than other number
# larger numbers should be second argument (performance)
gre? [[>?(1 - 0)]]
@@ -297,7 +297,7 @@ gre? [[>?(1 - 0)]]
:test ((+2) >? (+2)) (false)
:test ((+3) >? (+2)) (true)
-# returns whether number is less than other number
+# returns true if number is less than other number
# smaller numbers should be second argument (performance)
les? \gre?
@@ -307,7 +307,7 @@ les? \gre?
:test ((+2) <? (+2)) (false)
:test ((+3) <? (+2)) (false)
-# returns whether number is less than or equal to other number
+# returns true if number is less than or equal to other number
# smaller numbers should be second argument (performance)
leq? [[!(1 >? 0)]]
@@ -317,7 +317,7 @@ leq? [[!(1 >? 0)]]
:test ((+2) <=? (+2)) (true)
:test ((+3) <=? (+2)) (false)
-# returns whether number is greater than or equal to other number
+# returns true if number is greater than or equal to other number
# smaller numbers should be second argument (performance)
geq? \leq?