functionIsNotImplementedForType
Raise system exception.
fName
function name.
t
type.
never
This function raises system exception.
Use it to mark that class function need to be implemented in some type.
let functionIsNotImplementedForType fName t =
...
Exception
Base class for any Lumen exception.
type Exception = class
...
message
Required function to implement
Exception class
Text
a string representation of an error
let message (self: 'T) =
"exception raised"
Ord
This class contains functions for comparsion.
type Ord = class
...
type NumWrap = NumWrap a
implements Ord
let compare y x =
if x.a < y.a:
return -1
if x.a > y.a:
return 1
return 0
let w1 = NumWrap 0
let w2 = NumWrap 7
println (w1 < w2)
println (w1 > w2)
println (w1 >= w2)
println (Ord.min w1 w2)
println (Ord.max w1 w2)
println (NumWrap.compare w1 w2)
compare
Required function to implement
Ord class.
Takes two objects, return -1, 0 or 1.
x
'T
first object
y
'Y
second object
Number
returns zero if objects are equal, -1 if first object less than second, and 1 otherwise
<=>
x
'T
first object
y
'Y
second object
Number
returns zero if objects are equal, -1 if first object less than second, and 1 otherwise
<
Compare two values.
x
'T
first object
y
'Y
second object
>
Compare two values.
x
'T
first object
y
'Y
second object
<=
Compare two values.
x
'T
first object
y
'Y
second object
>=
Compare two values.
x
'T
first object
y
'Y
second object
min
Returns minimum of two values.
x
'T
first value
y
'Y
second value
'T | 'Y
y when x > y, x otherwise
let min x y =
...
max
Returns maximum of two values.
x
'T
first value
y
'Y
second value
'T | 'Y
x when x > y, y otherwise
let max x y =
...
between
Returns true if first parameter >= second and <= third.
x
'X
first value
y
'Y
second value
z
'Z
thrid value
Bool
true if first parameter >= second and <= third, false otherwise
let between x y z =
...
betweenInEx
Returns true if first parameter >= second and < third.
x
'X
first value
y
'Y
second value
z
'Z
thrid value
Bool
true if first parameter >= second and < third, false otherwise
let betweenInEx x y z =
...
betweenExIn
Returns true if first parameter > second and <= third.
x
'X
first value
y
'Y
second value
z
'Z
thrid value
Bool
true if first parameter > second and <= third, false otherwise
let betweenExIn x y z =
...
betweenExEx
Returns true if first parameter > second and < third.
x
'X
first value
y
'Y
second value
z
'Z
thrid value
Bool
true if first parameter > second and < third, false otherwise
let betweenExEx x y z =
...
Collection
Collection class.
type Collection = class
 implements Functor
...
toStream
Required function to implement
Collection class.
Make Stream value from 'T value.
fromStream
Required function to implement
Collection class.
Make value of type 'T from Stream.
stream
Stream
stream to convert
'T
*
Returns length of stream.
This function iterate over each element of collection.
Do not call this function on infinity collections.
/
This function iterate over each element of collection.
Do not call this function on infinity collections.
*
This function iterate over each element of collection.
Do not call this function on infinity collections.
Text
concatenated string.
*
You can call this function with infinity collection, but it is meaningless.
count
Int
count of times to repeat
Text
Represent a text values.
*
Returns length of text.
+
Concatenates two text values.
self
Text
left part of result.
other
Text
right part of result.
*
Repeat text.
self
Text
text value to repeat.
other
Number
how many times repeat.
/
Split text by a separator.
self
Text
text value to repeat.
Array
parts of original text.
/
Split text on a parts with equal length.
self
Text
text value to repeat.
other
Number
maximum length of the part.
Array
parts of original text.