Skip to content

Latest commit

 

History

History
75 lines (47 loc) · 934 Bytes

math.md

File metadata and controls

75 lines (47 loc) · 934 Bytes

Math

Functions

<

(<) :: (Any a) => a -> a -> Bool

Returns true if (= (cmp lhs rhs) Less)

Example

(< 3 4) ;; True
(< 3 3) ;; False

>

(>) :: (Any a) => a -> a -> Bool

Returns true if (= (cmp lhs rhs) Greater)

Example

(> 3 4) ;; False
(> 5 3) ;; True

>=

(>=) :: (Any a) => a -> a -> Bool

Returns true if (or (= lhs rhs) (> lhs rhs)).

Example

(>= 4 4) ;; True
(>= 3 4) ;; False

<=

(<=) :: (Any a) => a -> a -> Bool

Returns true if (or (= lhs rhs) (< lhs rhs)).

Example

(<= 3 3) ;; True
(<= 3 4) ;; True

%

(%) :: Integer -> Integer -> Integer

Returns the remainder of the euclidian division of lhs by rhs.

Arguments

  • lhs :: Value: Left hand side argument.
  • rhs :: Value: Right hand side argument.

Example

(% 10 3) ;; 1
(% 12 3) ;; 0