-
- Downloads
"experimental/AcousticSolver.cpp" did not exist on "2d79d705d4bd912e21f462c74e5e9f199cb35602"
Add automatic conversion of tuples to R^d as function arguments
For consistency as tuple can be used to initialize R^d elements such as in `` R^3 x = (1,2,3); `` they can be used as function parameters `` let f: R^3->R, x -> x[0]+x[1]+x[2]; R x = f((1,2,3)); `` Observe mandatory parenthesis surrounding the tuple. Their prevent ambiguous writing. For instance one can write `` let f: R*R^3*R^2->R, (t,x,y) -> t*(x[0]+x[1]+x[2])*y[0]+y[1]; R x = f(2,(1,2,3),(2,1.3)); `` Obviously, `f(2,(1,2,3),(2,1.3))` makes complete sense, while without these parenthesis, `f(2,1,2,3,2,1.3)` would require non-trivial decoding.
Please register or sign in to comment