Skip to content
Snippets Groups Projects
Commit bc6a2d3c authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

Add tuple expressions for vector initialization

This allows to write

``
let f : R -> R^3, x -> (x, 2*x+1, -2);
R^3 x = f(2.3);
``

or even

``
let f : R -> R^3*R, x -> ((x, 2*x+1, -2), x-1);
R^3*R (x,t) = f(2.3);
``

Note that it is not completely functional since
``
let f : R -> R^3, x -> (x, 2*x+1, -2);
R^3 x = 2*f(2.3);
``
does not work!
The return type of `f(2.3)` is incorrect (should be an R^3 but
remains a `typename` which is improper for these calculations).
parent 6b2407fc
No related branches found
No related tags found
1 merge request!37Feature/language
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment