Skip to content
Snippets Groups Projects
Select Git revision
  • 72b3ce3d7fb051f670e046ae448aa033a271d3a1
  • develop default protected
  • feature/local-dt-fsi
  • feature/advection
  • save_clemence
  • feature/reconstruction
  • feature/kinetic-schemes
  • feature/composite-scheme-sources
  • feature/composite-scheme-other-fluxes
  • origin/stage/bouguettaia
  • feature/variational-hydro
  • feature/gmsh-reader
  • feature/serraille
  • feature/composite-scheme
  • hyperplastic
  • feature/polynomials
  • feature/gks
  • feature/implicit-solver-o2
  • feature/coupling_module
  • feature/implicit-solver
  • feature/merge-local-dt-fsi
  • v0.5.0 protected
  • v0.4.1 protected
  • v0.4.0 protected
  • v0.3.0 protected
  • v0.2.0 protected
  • v0.1.0 protected
  • Kidder
  • v0.0.4 protected
  • v0.0.3 protected
  • v0.0.2 protected
  • v0 protected
  • v0.0.1 protected
33 results

pugs

Stephane Del Pino's avatar
Stéphane Del Pino authored
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.
72b3ce3d
History
Name Last commit Last update