☰
API-Documentation: module lock_free
Constructors
array -- one-dimensional immutable array
This is the result type of array(type, i32, i32 -> T) which creates an
initialized immutable array
Note: This uses dummy unit-type args to avoid
name clash with routine array(T,length,init).
array(length0, length1) -- two-dimensional immutable array
array provides two-dimensional immutable arrays. These are actually
one-dimensional immutable arrays with an additional access function with
two index parameters.
array(length0, length1, length2) -- three-dimensional immutable array
array provides three-dimensional immutable arrays. These are actually
one-dimensional immutable arrays with an additional access function with
three index parameters.
container -- unit feature to group features that provide some kind of
data structure to store and retrieve values
envir -- unit feature to group environment related features
fuzion -- unit feature to group fuzion-infrustructure related features
An interval `from..through` that includes `from`, `from+step`, `from+step+step`,
etc. up to and including `through`.
In case step is positive (negative), the first value larger (smaller) than
through will not be included.
In case `step.sign = (from ⋄ through).sign`, this `Set` is empty, e.g.,
`interval 1 2 -1` and `interval 2 1 1` are both empty.
lock_free -- unit type feature grouping lock-free
data structures and algorithms
Sequence -- ancestor for features that can be converted to a 'list'
Sequences are empty, finite or infinite ordered collections of instances
of a given type. Sequences may calculate elements lazily on demand.
Sequence is a 'ref' type, i.e., different sub-features may be assigned
to a field of type 'Sequence'.
Heirs of Sequence must implement 'as_list'.Choice Types
list -- feature used to define lists
list provides an abstract type for a sequence of elements of the same type.
A list sequence may be empty and contain no element, or it may have a fixed
or even an infinite number of elements.
The core of the implementation of an actual list lies in the implementation
of the actual Cons cell a non-empty list consists of.
Lists can typically be traversed using only immutable data. This makes them
more flexible than streams that require to store and update their state.
A list is immutable, so it can be reused and shared between threads.
Due to the nature of lists, in which many Cons cells are used, a list
may require more (heap) allocation than an array.
option -- feature wrapping a value or nothing
option represents an optional value of type T
§outcome -- result type for functions that may return an error
outcome is a choice type that represents the result of a routine that
may either produce something useful or fail producing an error condition.
Several error conditions are needed if there are several very different
reasons for an operation to fail, e.g.
get_data (u User, t Type) outcome data IO_Error Permission_Error is
read_file t Type outcome data IO_Error is
Note that 'outcome data IO_Error' is not assignment compatible with
'outcome data IO_Error Permission_Error', it has to be unwrapped first.
This unwrapping, however, requires very little boilerplate, it is done
using the '?' on the result of the call to 'read_file': This unwraps
'outcome data IO_Error' into 'IO_Error', which would be returned abruptly,
and 'data', which would be returned normally. Both are assignment
compatible to 'outcome data IO_Error Permission_Error', so everything
is fine.
switch is the parent feature of all choices
that encode success and failure,
e.g. option (something/nil)
array -- one-dimensional immutable array
This is the result type of array(type, i32, i32 -> T) which creates an
initialized immutable array
Note: This uses dummy unit-type args to avoid
name clash with routine array(T,length,init).
This is the result type of array(type, i32, i32 -> T) which creates an
initialized immutable array
Note: This uses dummy unit-type args to avoid
name clash with routine array(T,length,init).
array(length0, length1) -- two-dimensional immutable array
array provides two-dimensional immutable arrays. These are actually
one-dimensional immutable arrays with an additional access function with
two index parameters.
array(length0, length1, length2) -- three-dimensional immutable array
array provides three-dimensional immutable arrays. These are actually
one-dimensional immutable arrays with an additional access function with
three index parameters.
container -- unit feature to group features that provide some kind of
data structure to store and retrieve values
envir -- unit feature to group environment related features
fuzion -- unit feature to group fuzion-infrustructure related features
An interval `from..through` that includes `from`, `from+step`, `from+step+step`,
etc. up to and including `through`.
In case step is positive (negative), the first value larger (smaller) than
through will not be included.
In case `step.sign = (from ⋄ through).sign`, this `Set` is empty, e.g.,
`interval 1 2 -1` and `interval 2 1 1` are both empty.
lock_free -- unit type feature grouping lock-free
data structures and algorithms
Sequence -- ancestor for features that can be converted to a 'list'
Sequences are empty, finite or infinite ordered collections of instances
of a given type. Sequences may calculate elements lazily on demand.
Sequence is a 'ref' type, i.e., different sub-features may be assigned
to a field of type 'Sequence'.
Heirs of Sequence must implement 'as_list'.Choice Types
list -- feature used to define lists
list provides an abstract type for a sequence of elements of the same type.
A list sequence may be empty and contain no element, or it may have a fixed
or even an infinite number of elements.
The core of the implementation of an actual list lies in the implementation
of the actual Cons cell a non-empty list consists of.
Lists can typically be traversed using only immutable data. This makes them
more flexible than streams that require to store and update their state.
A list is immutable, so it can be reused and shared between threads.
Due to the nature of lists, in which many Cons cells are used, a list
may require more (heap) allocation than an array.
option -- feature wrapping a value or nothing
option represents an optional value of type T
§outcome -- result type for functions that may return an error
outcome is a choice type that represents the result of a routine that
may either produce something useful or fail producing an error condition.
Several error conditions are needed if there are several very different
reasons for an operation to fail, e.g.
get_data (u User, t Type) outcome data IO_Error Permission_Error is
read_file t Type outcome data IO_Error is
Note that 'outcome data IO_Error' is not assignment compatible with
'outcome data IO_Error Permission_Error', it has to be unwrapped first.
This unwrapping, however, requires very little boilerplate, it is done
using the '?' on the result of the call to 'read_file': This unwraps
'outcome data IO_Error' into 'IO_Error', which would be returned abruptly,
and 'data', which would be returned normally. Both are assignment
compatible to 'outcome data IO_Error Permission_Error', so everything
is fine.
switch is the parent feature of all choices
that encode success and failure,
e.g. option (something/nil)
array(length0, length1) -- two-dimensional immutable array
array provides two-dimensional immutable arrays. These are actually
one-dimensional immutable arrays with an additional access function with
two index parameters.
array provides two-dimensional immutable arrays. These are actually
one-dimensional immutable arrays with an additional access function with
two index parameters.
array(length0, length1, length2) -- three-dimensional immutable array
array provides three-dimensional immutable arrays. These are actually
one-dimensional immutable arrays with an additional access function with
three index parameters.
container -- unit feature to group features that provide some kind of
data structure to store and retrieve values
envir -- unit feature to group environment related features
fuzion -- unit feature to group fuzion-infrustructure related features
An interval `from..through` that includes `from`, `from+step`, `from+step+step`,
etc. up to and including `through`.
In case step is positive (negative), the first value larger (smaller) than
through will not be included.
In case `step.sign = (from ⋄ through).sign`, this `Set` is empty, e.g.,
`interval 1 2 -1` and `interval 2 1 1` are both empty.
lock_free -- unit type feature grouping lock-free
data structures and algorithms
Sequence -- ancestor for features that can be converted to a 'list'
Sequences are empty, finite or infinite ordered collections of instances
of a given type. Sequences may calculate elements lazily on demand.
Sequence is a 'ref' type, i.e., different sub-features may be assigned
to a field of type 'Sequence'.
Heirs of Sequence must implement 'as_list'.Choice Types
list -- feature used to define lists
list provides an abstract type for a sequence of elements of the same type.
A list sequence may be empty and contain no element, or it may have a fixed
or even an infinite number of elements.
The core of the implementation of an actual list lies in the implementation
of the actual Cons cell a non-empty list consists of.
Lists can typically be traversed using only immutable data. This makes them
more flexible than streams that require to store and update their state.
A list is immutable, so it can be reused and shared between threads.
Due to the nature of lists, in which many Cons cells are used, a list
may require more (heap) allocation than an array.
option -- feature wrapping a value or nothing
option represents an optional value of type T
§outcome -- result type for functions that may return an error
outcome is a choice type that represents the result of a routine that
may either produce something useful or fail producing an error condition.
Several error conditions are needed if there are several very different
reasons for an operation to fail, e.g.
get_data (u User, t Type) outcome data IO_Error Permission_Error is
read_file t Type outcome data IO_Error is
Note that 'outcome data IO_Error' is not assignment compatible with
'outcome data IO_Error Permission_Error', it has to be unwrapped first.
This unwrapping, however, requires very little boilerplate, it is done
using the '?' on the result of the call to 'read_file': This unwraps
'outcome data IO_Error' into 'IO_Error', which would be returned abruptly,
and 'data', which would be returned normally. Both are assignment
compatible to 'outcome data IO_Error Permission_Error', so everything
is fine.
switch is the parent feature of all choices
that encode success and failure,
e.g. option (something/nil)
array(length0, length1, length2) -- three-dimensional immutable array
array provides three-dimensional immutable arrays. These are actually
one-dimensional immutable arrays with an additional access function with
three index parameters.
array provides three-dimensional immutable arrays. These are actually
one-dimensional immutable arrays with an additional access function with
three index parameters.
container -- unit feature to group features that provide some kind of
data structure to store and retrieve values
envir -- unit feature to group environment related features
fuzion -- unit feature to group fuzion-infrustructure related features
An interval `from..through` that includes `from`, `from+step`, `from+step+step`,
etc. up to and including `through`.
In case step is positive (negative), the first value larger (smaller) than
through will not be included.
In case `step.sign = (from ⋄ through).sign`, this `Set` is empty, e.g.,
`interval 1 2 -1` and `interval 2 1 1` are both empty.
lock_free -- unit type feature grouping lock-free
data structures and algorithms
Sequence -- ancestor for features that can be converted to a 'list'
Sequences are empty, finite or infinite ordered collections of instances
of a given type. Sequences may calculate elements lazily on demand.
Sequence is a 'ref' type, i.e., different sub-features may be assigned
to a field of type 'Sequence'.
Heirs of Sequence must implement 'as_list'.Choice Types
list -- feature used to define lists
list provides an abstract type for a sequence of elements of the same type.
A list sequence may be empty and contain no element, or it may have a fixed
or even an infinite number of elements.
The core of the implementation of an actual list lies in the implementation
of the actual Cons cell a non-empty list consists of.
Lists can typically be traversed using only immutable data. This makes them
more flexible than streams that require to store and update their state.
A list is immutable, so it can be reused and shared between threads.
Due to the nature of lists, in which many Cons cells are used, a list
may require more (heap) allocation than an array.
option -- feature wrapping a value or nothing
option represents an optional value of type T
§outcome -- result type for functions that may return an error
outcome is a choice type that represents the result of a routine that
may either produce something useful or fail producing an error condition.
Several error conditions are needed if there are several very different
reasons for an operation to fail, e.g.
get_data (u User, t Type) outcome data IO_Error Permission_Error is
read_file t Type outcome data IO_Error is
Note that 'outcome data IO_Error' is not assignment compatible with
'outcome data IO_Error Permission_Error', it has to be unwrapped first.
This unwrapping, however, requires very little boilerplate, it is done
using the '?' on the result of the call to 'read_file': This unwraps
'outcome data IO_Error' into 'IO_Error', which would be returned abruptly,
and 'data', which would be returned normally. Both are assignment
compatible to 'outcome data IO_Error Permission_Error', so everything
is fine.
switch is the parent feature of all choices
that encode success and failure,
e.g. option (something/nil)
container -- unit feature to group features that provide some kind of
data structure to store and retrieve values
data structure to store and retrieve values
envir -- unit feature to group environment related features
fuzion -- unit feature to group fuzion-infrustructure related features
An interval `from..through` that includes `from`, `from+step`, `from+step+step`,
etc. up to and including `through`.
In case step is positive (negative), the first value larger (smaller) than
through will not be included.
In case `step.sign = (from ⋄ through).sign`, this `Set` is empty, e.g.,
`interval 1 2 -1` and `interval 2 1 1` are both empty.
lock_free -- unit type feature grouping lock-free
data structures and algorithms
Sequence -- ancestor for features that can be converted to a 'list'
Sequences are empty, finite or infinite ordered collections of instances
of a given type. Sequences may calculate elements lazily on demand.
Sequence is a 'ref' type, i.e., different sub-features may be assigned
to a field of type 'Sequence'.
Heirs of Sequence must implement 'as_list'.Choice Types
list -- feature used to define lists
list provides an abstract type for a sequence of elements of the same type.
A list sequence may be empty and contain no element, or it may have a fixed
or even an infinite number of elements.
The core of the implementation of an actual list lies in the implementation
of the actual Cons cell a non-empty list consists of.
Lists can typically be traversed using only immutable data. This makes them
more flexible than streams that require to store and update their state.
A list is immutable, so it can be reused and shared between threads.
Due to the nature of lists, in which many Cons cells are used, a list
may require more (heap) allocation than an array.
option -- feature wrapping a value or nothing
option represents an optional value of type T
§outcome -- result type for functions that may return an error
outcome is a choice type that represents the result of a routine that
may either produce something useful or fail producing an error condition.
Several error conditions are needed if there are several very different
reasons for an operation to fail, e.g.
get_data (u User, t Type) outcome data IO_Error Permission_Error is
read_file t Type outcome data IO_Error is
Note that 'outcome data IO_Error' is not assignment compatible with
'outcome data IO_Error Permission_Error', it has to be unwrapped first.
This unwrapping, however, requires very little boilerplate, it is done
using the '?' on the result of the call to 'read_file': This unwraps
'outcome data IO_Error' into 'IO_Error', which would be returned abruptly,
and 'data', which would be returned normally. Both are assignment
compatible to 'outcome data IO_Error Permission_Error', so everything
is fine.
switch is the parent feature of all choices
that encode success and failure,
e.g. option (something/nil)
envir -- unit feature to group environment related features
fuzion -- unit feature to group fuzion-infrustructure related features
An interval `from..through` that includes `from`, `from+step`, `from+step+step`,
etc. up to and including `through`.
In case step is positive (negative), the first value larger (smaller) than
through will not be included.
In case `step.sign = (from ⋄ through).sign`, this `Set` is empty, e.g.,
`interval 1 2 -1` and `interval 2 1 1` are both empty.
lock_free -- unit type feature grouping lock-free
data structures and algorithms
Sequence -- ancestor for features that can be converted to a 'list'
Sequences are empty, finite or infinite ordered collections of instances
of a given type. Sequences may calculate elements lazily on demand.
Sequence is a 'ref' type, i.e., different sub-features may be assigned
to a field of type 'Sequence'.
Heirs of Sequence must implement 'as_list'.Choice Types
list -- feature used to define lists
list provides an abstract type for a sequence of elements of the same type.
A list sequence may be empty and contain no element, or it may have a fixed
or even an infinite number of elements.
The core of the implementation of an actual list lies in the implementation
of the actual Cons cell a non-empty list consists of.
Lists can typically be traversed using only immutable data. This makes them
more flexible than streams that require to store and update their state.
A list is immutable, so it can be reused and shared between threads.
Due to the nature of lists, in which many Cons cells are used, a list
may require more (heap) allocation than an array.
option -- feature wrapping a value or nothing
option represents an optional value of type T
§outcome -- result type for functions that may return an error
outcome is a choice type that represents the result of a routine that
may either produce something useful or fail producing an error condition.
Several error conditions are needed if there are several very different
reasons for an operation to fail, e.g.
get_data (u User, t Type) outcome data IO_Error Permission_Error is
read_file t Type outcome data IO_Error is
Note that 'outcome data IO_Error' is not assignment compatible with
'outcome data IO_Error Permission_Error', it has to be unwrapped first.
This unwrapping, however, requires very little boilerplate, it is done
using the '?' on the result of the call to 'read_file': This unwraps
'outcome data IO_Error' into 'IO_Error', which would be returned abruptly,
and 'data', which would be returned normally. Both are assignment
compatible to 'outcome data IO_Error Permission_Error', so everything
is fine.
switch is the parent feature of all choices
that encode success and failure,
e.g. option (something/nil)
fuzion -- unit feature to group fuzion-infrustructure related features
An interval `from..through` that includes `from`, `from+step`, `from+step+step`,
etc. up to and including `through`.
In case step is positive (negative), the first value larger (smaller) than
through will not be included.
In case `step.sign = (from ⋄ through).sign`, this `Set` is empty, e.g.,
`interval 1 2 -1` and `interval 2 1 1` are both empty.
lock_free -- unit type feature grouping lock-free
data structures and algorithms
Sequence -- ancestor for features that can be converted to a 'list'
Sequences are empty, finite or infinite ordered collections of instances
of a given type. Sequences may calculate elements lazily on demand.
Sequence is a 'ref' type, i.e., different sub-features may be assigned
to a field of type 'Sequence'.
Heirs of Sequence must implement 'as_list'.Choice Types
list -- feature used to define lists
list provides an abstract type for a sequence of elements of the same type.
A list sequence may be empty and contain no element, or it may have a fixed
or even an infinite number of elements.
The core of the implementation of an actual list lies in the implementation
of the actual Cons cell a non-empty list consists of.
Lists can typically be traversed using only immutable data. This makes them
more flexible than streams that require to store and update their state.
A list is immutable, so it can be reused and shared between threads.
Due to the nature of lists, in which many Cons cells are used, a list
may require more (heap) allocation than an array.
option -- feature wrapping a value or nothing
option represents an optional value of type T
§outcome -- result type for functions that may return an error
outcome is a choice type that represents the result of a routine that
may either produce something useful or fail producing an error condition.
Several error conditions are needed if there are several very different
reasons for an operation to fail, e.g.
get_data (u User, t Type) outcome data IO_Error Permission_Error is
read_file t Type outcome data IO_Error is
Note that 'outcome data IO_Error' is not assignment compatible with
'outcome data IO_Error Permission_Error', it has to be unwrapped first.
This unwrapping, however, requires very little boilerplate, it is done
using the '?' on the result of the call to 'read_file': This unwraps
'outcome data IO_Error' into 'IO_Error', which would be returned abruptly,
and 'data', which would be returned normally. Both are assignment
compatible to 'outcome data IO_Error Permission_Error', so everything
is fine.
switch is the parent feature of all choices
that encode success and failure,
e.g. option (something/nil)
An interval `from..through` that includes `from`, `from+step`, `from+step+step`,
etc. up to and including `through`.
In case step is positive (negative), the first value larger (smaller) than
through will not be included.
In case `step.sign = (from ⋄ through).sign`, this `Set` is empty, e.g.,
`interval 1 2 -1` and `interval 2 1 1` are both empty.
etc. up to and including `through`.
In case step is positive (negative), the first value larger (smaller) than
through will not be included.
In case `step.sign = (from ⋄ through).sign`, this `Set` is empty, e.g.,
`interval 1 2 -1` and `interval 2 1 1` are both empty.
lock_free -- unit type feature grouping lock-free
data structures and algorithms
Sequence -- ancestor for features that can be converted to a 'list'
Sequences are empty, finite or infinite ordered collections of instances
of a given type. Sequences may calculate elements lazily on demand.
Sequence is a 'ref' type, i.e., different sub-features may be assigned
to a field of type 'Sequence'.
Heirs of Sequence must implement 'as_list'.Choice Types
list -- feature used to define lists
list provides an abstract type for a sequence of elements of the same type.
A list sequence may be empty and contain no element, or it may have a fixed
or even an infinite number of elements.
The core of the implementation of an actual list lies in the implementation
of the actual Cons cell a non-empty list consists of.
Lists can typically be traversed using only immutable data. This makes them
more flexible than streams that require to store and update their state.
A list is immutable, so it can be reused and shared between threads.
Due to the nature of lists, in which many Cons cells are used, a list
may require more (heap) allocation than an array.
option -- feature wrapping a value or nothing
option represents an optional value of type T
§outcome -- result type for functions that may return an error
outcome is a choice type that represents the result of a routine that
may either produce something useful or fail producing an error condition.
Several error conditions are needed if there are several very different
reasons for an operation to fail, e.g.
get_data (u User, t Type) outcome data IO_Error Permission_Error is
read_file t Type outcome data IO_Error is
Note that 'outcome data IO_Error' is not assignment compatible with
'outcome data IO_Error Permission_Error', it has to be unwrapped first.
This unwrapping, however, requires very little boilerplate, it is done
using the '?' on the result of the call to 'read_file': This unwraps
'outcome data IO_Error' into 'IO_Error', which would be returned abruptly,
and 'data', which would be returned normally. Both are assignment
compatible to 'outcome data IO_Error Permission_Error', so everything
is fine.
switch is the parent feature of all choices
that encode success and failure,
e.g. option (something/nil)
lock_free -- unit type feature grouping lock-free
data structures and algorithms
data structures and algorithms
Sequence -- ancestor for features that can be converted to a 'list'
Sequences are empty, finite or infinite ordered collections of instances
of a given type. Sequences may calculate elements lazily on demand.
Sequence is a 'ref' type, i.e., different sub-features may be assigned
to a field of type 'Sequence'.
Heirs of Sequence must implement 'as_list'.Choice Types
list -- feature used to define lists
list provides an abstract type for a sequence of elements of the same type.
A list sequence may be empty and contain no element, or it may have a fixed
or even an infinite number of elements.
The core of the implementation of an actual list lies in the implementation
of the actual Cons cell a non-empty list consists of.
Lists can typically be traversed using only immutable data. This makes them
more flexible than streams that require to store and update their state.
A list is immutable, so it can be reused and shared between threads.
Due to the nature of lists, in which many Cons cells are used, a list
may require more (heap) allocation than an array.
option -- feature wrapping a value or nothing
option represents an optional value of type T
§outcome -- result type for functions that may return an error
outcome is a choice type that represents the result of a routine that
may either produce something useful or fail producing an error condition.
Several error conditions are needed if there are several very different
reasons for an operation to fail, e.g.
get_data (u User, t Type) outcome data IO_Error Permission_Error is
read_file t Type outcome data IO_Error is
Note that 'outcome data IO_Error' is not assignment compatible with
'outcome data IO_Error Permission_Error', it has to be unwrapped first.
This unwrapping, however, requires very little boilerplate, it is done
using the '?' on the result of the call to 'read_file': This unwraps
'outcome data IO_Error' into 'IO_Error', which would be returned abruptly,
and 'data', which would be returned normally. Both are assignment
compatible to 'outcome data IO_Error Permission_Error', so everything
is fine.
switch is the parent feature of all choices
that encode success and failure,
e.g. option (something/nil)
Sequence -- ancestor for features that can be converted to a 'list'
Sequences are empty, finite or infinite ordered collections of instances
of a given type. Sequences may calculate elements lazily on demand.
Sequence is a 'ref' type, i.e., different sub-features may be assigned
to a field of type 'Sequence'.
Heirs of Sequence must implement 'as_list'.
Sequences are empty, finite or infinite ordered collections of instances
of a given type. Sequences may calculate elements lazily on demand.
Sequence is a 'ref' type, i.e., different sub-features may be assigned
to a field of type 'Sequence'.
Heirs of Sequence must implement 'as_list'.
Choice Types
list -- feature used to define lists
list provides an abstract type for a sequence of elements of the same type.
A list sequence may be empty and contain no element, or it may have a fixed
or even an infinite number of elements.
The core of the implementation of an actual list lies in the implementation
of the actual Cons cell a non-empty list consists of.
Lists can typically be traversed using only immutable data. This makes them
more flexible than streams that require to store and update their state.
A list is immutable, so it can be reused and shared between threads.
Due to the nature of lists, in which many Cons cells are used, a list
may require more (heap) allocation than an array.
option -- feature wrapping a value or nothing
option represents an optional value of type T
§outcome -- result type for functions that may return an error
outcome is a choice type that represents the result of a routine that
may either produce something useful or fail producing an error condition.
Several error conditions are needed if there are several very different
reasons for an operation to fail, e.g.
get_data (u User, t Type) outcome data IO_Error Permission_Error is
read_file t Type outcome data IO_Error is
Note that 'outcome data IO_Error' is not assignment compatible with
'outcome data IO_Error Permission_Error', it has to be unwrapped first.
This unwrapping, however, requires very little boilerplate, it is done
using the '?' on the result of the call to 'read_file': This unwraps
'outcome data IO_Error' into 'IO_Error', which would be returned abruptly,
and 'data', which would be returned normally. Both are assignment
compatible to 'outcome data IO_Error Permission_Error', so everything
is fine.
switch is the parent feature of all choices
that encode success and failure,
e.g. option (something/nil)
list -- feature used to define lists
list provides an abstract type for a sequence of elements of the same type.
A list sequence may be empty and contain no element, or it may have a fixed
or even an infinite number of elements.
The core of the implementation of an actual list lies in the implementation
of the actual Cons cell a non-empty list consists of.
Lists can typically be traversed using only immutable data. This makes them
more flexible than streams that require to store and update their state.
A list is immutable, so it can be reused and shared between threads.
Due to the nature of lists, in which many Cons cells are used, a list
may require more (heap) allocation than an array.
list provides an abstract type for a sequence of elements of the same type.
A list sequence may be empty and contain no element, or it may have a fixed
or even an infinite number of elements.
The core of the implementation of an actual list lies in the implementation
of the actual Cons cell a non-empty list consists of.
Lists can typically be traversed using only immutable data. This makes them
more flexible than streams that require to store and update their state.
A list is immutable, so it can be reused and shared between threads.
Due to the nature of lists, in which many Cons cells are used, a list
may require more (heap) allocation than an array.
option -- feature wrapping a value or nothing
option represents an optional value of type T
§outcome -- result type for functions that may return an error
outcome is a choice type that represents the result of a routine that
may either produce something useful or fail producing an error condition.
Several error conditions are needed if there are several very different
reasons for an operation to fail, e.g.
get_data (u User, t Type) outcome data IO_Error Permission_Error is
read_file t Type outcome data IO_Error is
Note that 'outcome data IO_Error' is not assignment compatible with
'outcome data IO_Error Permission_Error', it has to be unwrapped first.
This unwrapping, however, requires very little boilerplate, it is done
using the '?' on the result of the call to 'read_file': This unwraps
'outcome data IO_Error' into 'IO_Error', which would be returned abruptly,
and 'data', which would be returned normally. Both are assignment
compatible to 'outcome data IO_Error Permission_Error', so everything
is fine.
switch is the parent feature of all choices
that encode success and failure,
e.g. option (something/nil)
option -- feature wrapping a value or nothing
option represents an optional value of type T
option represents an optional value of type T
§outcome -- result type for functions that may return an error
outcome is a choice type that represents the result of a routine that
may either produce something useful or fail producing an error condition.
Several error conditions are needed if there are several very different
reasons for an operation to fail, e.g.
get_data (u User, t Type) outcome data IO_Error Permission_Error is
read_file t Type outcome data IO_Error is
Note that 'outcome data IO_Error' is not assignment compatible with
'outcome data IO_Error Permission_Error', it has to be unwrapped first.
This unwrapping, however, requires very little boilerplate, it is done
using the '?' on the result of the call to 'read_file': This unwraps
'outcome data IO_Error' into 'IO_Error', which would be returned abruptly,
and 'data', which would be returned normally. Both are assignment
compatible to 'outcome data IO_Error Permission_Error', so everything
is fine.
switch is the parent feature of all choices
that encode success and failure,
e.g. option (something/nil)
§
outcome -- result type for functions that may return an error
outcome is a choice type that represents the result of a routine that
may either produce something useful or fail producing an error condition.
Several error conditions are needed if there are several very different
reasons for an operation to fail, e.g.
get_data (u User, t Type) outcome data IO_Error Permission_Error is
read_file t Type outcome data IO_Error is
Note that 'outcome data IO_Error' is not assignment compatible with
'outcome data IO_Error Permission_Error', it has to be unwrapped first.
This unwrapping, however, requires very little boilerplate, it is done
using the '?' on the result of the call to 'read_file': This unwraps
'outcome data IO_Error' into 'IO_Error', which would be returned abruptly,
and 'data', which would be returned normally. Both are assignment
compatible to 'outcome data IO_Error Permission_Error', so everything
is fine.
outcome is a choice type that represents the result of a routine that
may either produce something useful or fail producing an error condition.
Several error conditions are needed if there are several very different
reasons for an operation to fail, e.g.
get_data (u User, t Type) outcome data IO_Error Permission_Error is
read_file t Type outcome data IO_Error is
Note that 'outcome data IO_Error' is not assignment compatible with
'outcome data IO_Error Permission_Error', it has to be unwrapped first.
This unwrapping, however, requires very little boilerplate, it is done
using the '?' on the result of the call to 'read_file': This unwraps
'outcome data IO_Error' into 'IO_Error', which would be returned abruptly,
and 'data', which would be returned normally. Both are assignment
compatible to 'outcome data IO_Error Permission_Error', so everything
is fine.
switch is the parent feature of all choices
that encode success and failure,
e.g. option (something/nil)
switch is the parent feature of all choices
that encode success and failure,
e.g. option (something/nil)
that encode success and failure,
e.g. option (something/nil)
Universe can not be called but you can use it in a call as part of a full qualifier, e.g.:
`universe.this.say "hello"`