laurelang
laurelang copied to clipboard
Feature: matrix and union
Matrix
: ?transpose('T'[x][y]) -> 'T'[y][x].
To make size variables invisible in predicate case's scope their names should start with underscore, such as _x
.
Implementation. After such cast matrix will gain matrix-confirmation.
Union
Builtin union template – external datatype sets union operator.
union<'T', ...>
optional<'T'>
s = 1 .. 3;
optional<s> a;
Declaration of a optional<'T'>
template
none_T ~ @{none}.
optional<'T'> = union<'T', none_T>
Solutions: @none
, 1
, 2
, 3
.
: ?transpose_array('T'[][]) -> optional<'T'>[][].
todo
- [ ] matrix
- [x] union