diff options
Diffstat (limited to 'std/Number')
-rw-r--r-- | std/Number/Binary.bruijn | 16 | ||||
-rw-r--r-- | std/Number/Ternary.bruijn | 20 | ||||
-rw-r--r-- | std/Number/Unary.bruijn | 16 |
3 files changed, 26 insertions, 26 deletions
diff --git a/std/Number/Binary.bruijn b/std/Number/Binary.bruijn index 064889d..eb63fe1 100644 --- a/std/Number/Binary.bruijn +++ b/std/Number/Binary.bruijn @@ -324,36 +324,36 @@ binary→ternary [y [[[rec]]] [0] 0 (+0t)] ⧗ Binary → Ternary # returns true if number is greater than other number # TODO: remove ternary conversion -gre? T.gre? ⋔ binary→ternary ⧗ Binary → Binary → Boolean +gt? T.gt? ⋔ binary→ternary ⧗ Binary → Binary → Boolean -…>?… gre? +…>?… gt? :test ((+1b) >? (+2b)) (false) :test ((+2b) >? (+2b)) (false) :test ((+3b) >? (+2b)) (true) # returns true if number is less than other number -les? \gre? ⧗ Binary → Binary → Boolean +lt? \gt? ⧗ Binary → Binary → Boolean -…<?… les? +…<?… lt? :test ((+1b) <? (+2b)) (true) :test ((+2b) <? (+2b)) (false) :test ((+3b) <? (+2b)) (false) # returns true if number is less than or equal to other number -leq? not! ∘∘ gre? ⧗ Binary → Binary → Boolean +le? not! ∘∘ gt? ⧗ Binary → Binary → Boolean -…≤?… leq? +…≤?… le? :test ((+1b) ≤? (+2b)) (true) :test ((+2b) ≤? (+2b)) (true) :test ((+3b) ≤? (+2b)) (false) # returns true if number is greater than or equal to other number -geq? \leq? ⧗ Binary → Binary → Boolean +ge? \le? ⧗ Binary → Binary → Boolean -…≥?… geq? +…≥?… ge? :test ((+1b) ≥? (+2b)) (false) :test ((+2b) ≥? (+2b)) (true) diff --git a/std/Number/Ternary.bruijn b/std/Number/Ternary.bruijn index 4eaaf5a..03af0e9 100644 --- a/std/Number/Ternary.bruijn +++ b/std/Number/Ternary.bruijn @@ -313,36 +313,36 @@ sub [[1 + -0]] ⧗ Number → Number → Number :test ((+42) - (+1) =? (+41)) (true) # returns true if number is greater than other number -gre? positive? ∘∘ sub ⧗ Number → Number → Boolean +gt? positive? ∘∘ sub ⧗ Number → Number → Boolean -…>?… gre? +…>?… gt? :test ((+1) >? (+2)) (false) :test ((+2) >? (+2)) (false) :test ((+3) >? (+2)) (true) # returns true if number is less than other number -les? \gre? ⧗ Number → Number → Boolean +lt? \gt? ⧗ Number → Number → Boolean -…<?… les? +…<?… lt? :test ((+1) <? (+2)) (true) :test ((+2) <? (+2)) (false) :test ((+3) <? (+2)) (false) # returns true if number is less than or equal to other number -leq? not! ∘∘ gre? ⧗ Number → Number → Boolean +le? not! ∘∘ gt? ⧗ Number → Number → Boolean -…≤?… leq? +…≤?… le? :test ((+1) ≤? (+2)) (true) :test ((+2) ≤? (+2)) (true) :test ((+3) ≤? (+2)) (false) # returns true if number is greater than or equal to other number -geq? \leq? ⧗ Number → Number → Boolean +ge? \le? ⧗ Number → Number → Boolean -…≥?… geq? +…≥?… ge? :test ((+1) ≥? (+2)) (false) :test ((+2) ≥? (+2)) (true) @@ -368,10 +368,10 @@ compare compare-case (+0) (+1) (-1) ⧗ Number → Number → Number c-eq? eq? (+0) ⧗ Number → Number # returns true if comparison result is less than (LT) -c-les? eq? (-1) ⧗ Number → Number +c-lt? eq? (-1) ⧗ Number → Number # returns true if comparison result is greater than (GT) -c-gre? eq? (+1) ⧗ Number → Number +c-gt? eq? (+1) ⧗ Number → Number # negates a balanced ternary number if <0 abs [<?0 -0 0] ⧗ Number → Number diff --git a/std/Number/Unary.bruijn b/std/Number/Unary.bruijn index 3b58ceb..bb3ef44 100644 --- a/std/Number/Unary.bruijn +++ b/std/Number/Unary.bruijn @@ -63,18 +63,18 @@ sub [[0 dec 1]] ⧗ Unary → Unary → Unary :test ((+5u) - (+3u)) ((+2u)) # returns true if number is less than or equal to other number -leq? zero? ∘∘ sub ⧗ Unary → Unary → Boolean +le? zero? ∘∘ sub ⧗ Unary → Unary → Boolean -…≤?… leq? +…≤?… le? :test ((+1u) ≤? (+2u)) (true) :test ((+2u) ≤? (+2u)) (true) :test ((+3u) ≤? (+2u)) (false) # returns true if number is greater than or equal to other number -geq? \leq? ⧗ Unary → Unary → Boolean +ge? \le? ⧗ Unary → Unary → Boolean -…≥?… geq? +…≥?… ge? :test ((+1u) ≥? (+2u)) (false) :test ((+2u) ≥? (+2u)) (true) @@ -82,9 +82,9 @@ geq? \leq? ⧗ Unary → Unary → Boolean # returns true if number is greater than other number # larger numbers should be second argument (performance) -gre? not! ∘∘ leq? ⧗ Unary → Unary → Boolean +gt? not! ∘∘ le? ⧗ Unary → Unary → Boolean -…>?… gre? +…>?… gt? :test ((+1u) >? (+2u)) (false) :test ((+2u) >? (+2u)) (false) @@ -92,9 +92,9 @@ gre? not! ∘∘ leq? ⧗ Unary → Unary → Boolean # returns true if number is less than other number # smaller numbers should be second argument (performance) -les? \gre? ⧗ Unary → Unary → Boolean +lt? \gt? ⧗ Unary → Unary → Boolean -…<?… les? +…<?… lt? :test ((+1u) <? (+2u)) (true) :test ((+2u) <? (+2u)) (false) |