Int

module methods:

value methods:

:

Return 0.

(Int :) -> int

+

Return Int+others.

(Int + others(numeric)...) -> numeric

-

Return Int-others.

(Int - others(numeric)...) -> numeric

*

Return Int*others.

(Int * others(numeric)...) -> numeric

/

Return Int/others. It returns an error, if any.

(Int / others(numeric)...) -> numeric

%

Return Int%others. It returns an error, if any.

(Int % others(int)...) -> int

**

Return Int**y, the base-Int exponential of y.

(Int ** y(numeric)...) -> float

>

Return Int>i. i will first be converted to numeric.

(Int > i(any)) -> bool

>=

Return Int>=i. i will first be converted to numeric.

(Int >= i(any)) -> bool

<

Return Int<i. i will first be converted to numeric.

(Int < i(any)) -> bool

<=

Return Int<=i. i will first be converted to numeric.

(Int <= i(any)) -> bool

abs

Return the absolute value of Int.

(Int abs) -> int

&

Calculate the result of bitwise AND of Int and i.

(Int & i(int)) -> int

|

Calculate the result of bitwise OR of Int and i.

(Int | i(int)) -> int

^

Calculate the result of bitwise XOR of Int and i.

(Int ^ i(int)) -> int

~

Calculate the result of bitwise NOT of Int.

(Int ~) -> int

<<

Left shift operation on Int. i should be non-negative.

(Int << i(int)) -> int

>>

Right shift operation on Int. i should be non-negative.

(Int >> i(int)) -> int

negate

Return the inverse of Int.

(Int negate) -> int

even?

Test whether Int is even.

(Int even?) -> bool

odd?

Test whether Int is odd.

(Int odd?) -> bool

next

Return Int+1.

(Int next) -> int

pred

Return Int-1.

(Int pred) -> int

..

Return a new Range. Int is begin and 0 is default end if i is not provided.

(Int .. i(int)) -> int

times

Call f (Int abs)-1 times, and cursor from 0 to (Int abs)-1 as the parameter of f.

(Int times f(lambda)) -> self

to_f

Transfer to Float

(Int to_f) -> float

to_i

Return Int self.

(Int to_i) -> int