Int
is the default integral data type.
*
external
(Fn [Int, Int] Int)
+
external
(Fn [Int, Int] Int)
-
external
(Fn [Int, Int] Int)
/
external
(Fn [Int, Int] Int)
<
external
(Fn [Int, Int] Bool)
=
external
(Fn [Int, Int] Bool)
>
external
(Fn [Int, Int] Bool)
abs
external
(Fn [Int] Int)
The absolute value (removes the negative sign) of an Int.
add-ref
defn
(Fn [(Ref Int a), (Ref Int b)] Int)
(add-ref x y)
bit-and
external
(Fn [Int, Int] Int)
bit-or
external
(Fn [Int, Int] Int)
bit-xor
external
(Fn [Int, Int] Int)
blit
defn
(Fn [Int] Int)
(blit x)
clamp
defn
(Fn [a, a, a] a)
(clamp min max val)
copy
external
(Fn [(Ref Int a)] Int)
dec
external
(Fn [Int] Int)
even?
defn
(Fn [Int] Bool)
(even? a)
external
(Fn [(Ref String a), Int] String)
from-int
defn
(Fn [Int] Int)
(from-int a)
acts as the identity function to implement the interface.
from-string
defn
(Fn [(Ref String a)] (Maybe Int))
(from-string s)
hash
defn
(Fn [(Ref Int a)] Int)
(hash k)
inc
external
(Fn [Int] Int)
mod
external
(Fn [Int, Int] Int)
neg
external
(Fn [Int] Int)
odd?
defn
(Fn [Int] Bool)
(odd? a)
positive-mod
defn
(Fn [Int, Int] Int)
(positive-mod k n)
Like mod but always returns a positive answer.
pow
defn
(Fn [Int, Int] Int)
(pow x y)
Raise x to the power of y.
prn
defn
(Fn [Int] String)
(prn x)
random
defn
(Fn [] Int)
(random)
safe-add
external
(Fn [Int, Int, (Ref Int a)] Bool)
Performs an addition and checks whether it overflowed.
safe-mul
external
(Fn [Int, Int, (Ref Int a)] Bool)
Performs an multiplication and checks whether it overflowed.
safe-sub
external
(Fn [Int, Int, (Ref Int a)] Bool)
Performs an substraction and checks whether it overflowed.
str
external
(Fn [Int] String)
to-int
defn
(Fn [Int] Int)
(to-int a)
acts as the identity function to implement the interface.
zero
defn
(Fn [] Int)
(zero)