Wrapl, The Programming Language
Home
About
Features
Status
Contact
Documentation
Tutorial
Reference
Syntax
Expressions
Sample
Libraries
Download
Source
Binaries
Links
Other Languages
Development Tools
Libraries
Discuss
Mailing List
Forum
Search
Libraries
Std
.
Integer
Types
T
Inherits from:
Std.Number.T
,
Std.Function.T
base type of all integer types
SmallT
Inherits from:
T
,
Std.Number.T
,
Std.Function.T
integers that fit into a signed machine word.
BigT
Inherits from:
T
,
Std.Number.T
,
Std.Function.T
arbritrary precision integers.
note: instances of type
BigT
should never contain values which can fit into a signed machine word.
Constants
One
:
T
Zero
:
T
Functions
Compare
(
a
@
T
,
b
@
T
)
:
Std.Object.T
Compares
a
and
b
and return either
Std.Object.Less
,
Std.Object.Equal
or
Std.Object.Greater
.
CompareSmall
(
a
@
SmallT
,
b
@
SmallT
)
:
Std.Object.T
Compares
a
and
b
and return either
Std.Object.Less
,
Std.Object.Equal
or
Std.Object.Greater
.
Hash
(
a
@
T
)
:
SmallT
Returns a hash for
a
.
HashSmall
(
a
@
SmallT
)
:
SmallT
Returns a hash for
a
.
NextPrime
(
)
ToSmallSmall
(
from
@
SmallT
,
to
@
SmallT
)
:
SmallT
generates the values from
from
to
to
inclusive
Methods
:
"#"
(
_
@
BigT
)
:
"%"
(
_
@
SmallT
,
_
@
BigT
)
:
"%"
(
_
@
BigT
,
_
@
SmallT
)
:
"%"
(
_
@
BigT
,
_
@
BigT
)
:
"%"
(
_
@
SmallT
,
_
@
SmallT
)
:
">"
(
_
@
SmallT
,
_
@
BigT
)
:
">"
(
_
@
BigT
,
_
@
SmallT
)
:
">"
(
_
@
BigT
,
_
@
BigT
)
:
">"
(
_
@
SmallT
,
_
@
SmallT
)
:
">="
(
_
@
SmallT
,
_
@
BigT
)
:
">="
(
_
@
BigT
,
_
@
SmallT
)
:
">="
(
_
@
BigT
,
_
@
BigT
)
:
">="
(
_
@
SmallT
,
_
@
SmallT
)
:
"<"
(
_
@
SmallT
,
_
@
BigT
)
:
"<"
(
_
@
BigT
,
_
@
SmallT
)
:
"<"
(
_
@
BigT
,
_
@
BigT
)
:
"<"
(
_
@
SmallT
,
_
@
SmallT
)
:
"<="
(
_
@
SmallT
,
_
@
BigT
)
:
"<="
(
_
@
BigT
,
_
@
SmallT
)
:
"<="
(
_
@
BigT
,
_
@
BigT
)
:
"<="
(
_
@
SmallT
,
_
@
SmallT
)
:
"*"
(
_
@
SmallT
,
_
@
BigT
)
:
"*"
(
_
@
BigT
,
_
@
SmallT
)
:
"*"
(
_
@
BigT
,
_
@
BigT
)
:
"*"
(
_
@
SmallT
,
_
@
SmallT
)
:
"+"
(
_
@
SmallT
,
_
@
BigT
)
:
"+"
(
_
@
BigT
,
_
@
SmallT
)
:
"+"
(
_
@
BigT
,
_
@
BigT
)
:
"+"
(
_
@
SmallT
,
_
@
SmallT
)
:
"-"
(
_
@
SmallT
,
_
@
BigT
)
:
"-"
(
_
@
BigT
,
_
@
SmallT
)
:
"-"
(
_
@
BigT
,
_
@
BigT
)
:
"-"
(
_
@
BigT
)
:
"-"
(
_
@
SmallT
,
_
@
SmallT
)
:
"-"
(
_
@
SmallT
)
:
"/"
(
_
@
BigT
,
_
@
SmallT
)
:
"/"
(
_
@
SmallT
,
_
@
BigT
)
:
"/"
(
_
@
BigT
,
_
@
BigT
)
:
"/"
(
_
@
SmallT
,
_
@
SmallT
)
:
"="
(
_
@
SmallT
,
_
@
BigT
)
:
"="
(
_
@
BigT
,
_
@
SmallT
)
:
"="
(
_
@
BigT
,
_
@
BigT
)
:
"="
(
_
@
SmallT
,
_
@
SmallT
)
:
"?"
(
_
@
SmallT
,
_
@
BigT
)
:
"?"
(
_
@
BigT
,
_
@
SmallT
)
:
"?"
(
_
@
BigT
,
_
@
BigT
)
:
"@"
(
_
@
Std.String.T
,
_
=
T
,
_
@
SmallT
)
:
"@"
(
_
@
Std.String.T
,
_
=
T
)
:
"@"
(
_
@
BigT
,
_
=
Std.String.T
,
_
@
SmallT
)
:
"@"
(
_
@
BigT
,
_
=
Std.String.T
)
:
"@"
(
_
@
SmallT
,
_
=
Std.String.T
,
_
@
SmallT
)
:
"@"
(
_
@
SmallT
,
_
=
Std.String.T
)
:
"[]"
(
_
@
BigT
,
_
@
SmallT
)
:
"[]"
(
_
@
SmallT
,
_
@
SmallT
)
:
"^"
(
_
@
BigT
,
_
@
Std.Rational.T
)
:
"^"
(
_
@
SmallT
,
_
@
Std.Rational.T
)
:
"^"
(
_
@
BigT
,
_
@
SmallT
)
:
"^"
(
_
@
SmallT
,
_
@
SmallT
)
:abs
(
_
@
BigT
)
:abs
(
_
@
SmallT
)
:and
(
_
@
SmallT
,
_
@
BigT
)
:and
(
_
@
BigT
,
_
@
SmallT
)
:and
(
_
@
BigT
,
_
@
BigT
)
:and
(
_
@
SmallT
,
_
@
SmallT
)
:base
(
_
@
Std.String.T
,
_
@
SmallT
)
:bin
(
_
@
BigT
,
_
@
SmallT
)
:bin
(
_
@
SmallT
,
_
@
SmallT
)
:bitcount
(
_
@
BigT
)
:bitcount
(
_
@
SmallT
)
:bits
(
_
@
BigT
)
:bits
(
_
@
SmallT
)
:ceil
(
_
@
BigT
)
:ceil
(
_
@
SmallT
)
:covers
(
_
@
SmallT
,
_
@
SmallT
)
:div
(
_
@
SmallT
,
_
@
BigT
)
:div
(
_
@
BigT
,
_
@
SmallT
)
:div
(
_
@
BigT
,
_
@
BigT
)
:div
(
_
@
SmallT
,
_
@
SmallT
)
:down
(
_
@
SmallT
)
:exp
(
_
@
SmallT
)
:fact
(
_
@
SmallT
)
:floor
(
_
@
BigT
)
:floor
(
_
@
SmallT
)
:gcd
(
_
@
SmallT
,
_
@
BigT
)
:gcd
(
_
@
BigT
,
_
@
SmallT
)
:gcd
(
_
@
BigT
,
_
@
BigT
)
:gcd
(
_
@
SmallT
,
_
@
SmallT
)
:hex
(
_
@
SmallT
)
:in
(
_
@
SmallT
,
_
@
BigT
)
:in
(
_
@
SmallT
,
_
@
SmallT
)
:is0
(
_
@
BigT
)
:is0
(
_
@
SmallT
)
:isqrt
(
_
@
SmallT
)
:isqrt
(
_
@
BigT
)
:ln
(
_
@
SmallT
)
:ones
(
_
@
BigT
,
_
@
SmallT
,
_
@
SmallT
)
:ones
(
_
@
BigT
,
_
@
SmallT
)
:ones
(
_
@
BigT
)
:ones
(
_
@
SmallT
,
_
@
SmallT
,
_
@
SmallT
)
:ones
(
_
@
SmallT
,
_
@
SmallT
)
:ones
(
_
@
SmallT
)
:or
(
_
@
SmallT
,
_
@
BigT
)
:or
(
_
@
BigT
,
_
@
SmallT
)
:or
(
_
@
BigT
,
_
@
BigT
)
:or
(
_
@
SmallT
,
_
@
SmallT
)
:repr
(
_
@
SmallT
,
_
@
SmallT
)
:rol
(
_
@
SmallT
,
_
@
SmallT
)
:ror
(
_
@
SmallT
,
_
@
SmallT
)
:sal
(
_
@
BigT
,
_
@
SmallT
)
:sal
(
_
@
SmallT
,
_
@
SmallT
)
:sar
(
_
@
BigT
,
_
@
SmallT
)
:sar
(
_
@
SmallT
,
_
@
SmallT
)
:scan0
(
_
@
BigT
)
:scan0
(
_
@
SmallT
)
:scan1
(
_
@
BigT
)
:scan1
(
_
@
SmallT
)
:shl
(
_
@
BigT
,
_
@
SmallT
)
:shl
(
_
@
SmallT
,
_
@
SmallT
)
:shr
(
_
@
BigT
,
_
@
SmallT
)
:shr
(
_
@
SmallT
,
_
@
SmallT
)
:sqrt
(
_
@
SmallT
)
:to
(
_
@
SmallT
,
_
@
SmallT
,
_
@
SmallT
)
:up
(
_
@
SmallT
)
:xor
(
_
@
SmallT
,
_
@
BigT
)
:xor
(
_
@
BigT
,
_
@
SmallT
)
:xor
(
_
@
BigT
,
_
@
BigT
)
:xor
(
_
@
SmallT
,
_
@
SmallT
)
:zeros
(
_
@
BigT
,
_
@
SmallT
,
_
@
SmallT
)
:zeros
(
_
@
BigT
,
_
@
SmallT
)
:zeros
(
_
@
BigT
)
:zeros
(
_
@
SmallT
,
_
@
SmallT
,
_
@
SmallT
)
:zeros
(
_
@
SmallT
,
_
@
SmallT
)
:zeros
(
_
@
SmallT
)
:
"~"
(
_
@
BigT
)
:
"~"
(
_
@
BigT
)
:
"~"
(
_
@
SmallT
)
:
"~="
(
_
@
SmallT
,
_
@
BigT
)
:
"~="
(
_
@
BigT
,
_
@
SmallT
)
:
"~="
(
_
@
BigT
,
_
@
BigT
)
:
"~="
(
_
@
SmallT
,
_
@
SmallT
)
Integer
Types
Constants
Functions
Methods