laurelang icon indicating copy to clipboard operation
laurelang copied to clipboard

Feature: matrix and union

Open timoniq opened this issue 2 years ago • 1 comments

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

timoniq avatar Jul 15 '22 08:07 timoniq