You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Functions that require at least 1 argument and are invoked with
0-arguments will yield the function itself
less arguments than required will yield a curried version of itself
Examples. Let's say standard f(x) -> y functions are invoked as f(), then f() -> f, e.g., f()(3) = f(3). This is of course idempotent, such that f()()()()()(3) = f(3). Similarly, if f(x,y) -> z we obtain f() -> f and f(x) -> g where g(y) = f(x, y), e.g., f(3)(2) = f(3, 2) and g = f(5) with g(2) = f(5, 2) and g(0) = f(5, 0).
This will be applied to all automatically inserted (external) functions as well as available standard functions (also e.g., to operators like add or subtract). This also applies to functions that are defined within MAGES.
f= (x, y) =>x+y;
g=f(2);
ans=g(3); // same as f(2, 3)
If more arguments are supplied the unnecessary arguments are just ignored. This behavior won't change.
The text was updated successfully, but these errors were encountered:
Functions that require at least 1 argument and are invoked with
Examples. Let's say standard
f(x) -> y
functions are invoked asf()
, thenf() -> f
, e.g.,f()(3) = f(3)
. This is of course idempotent, such thatf()()()()()(3) = f(3)
. Similarly, iff(x,y) -> z
we obtainf() -> f
andf(x) -> g
whereg(y) = f(x, y)
, e.g.,f(3)(2) = f(3, 2)
andg = f(5)
withg(2) = f(5, 2)
andg(0) = f(5, 0)
.This will be applied to all automatically inserted (external) functions as well as available standard functions (also e.g., to operators like
add
orsubtract
). This also applies to functions that are defined within MAGES.If more arguments are supplied the unnecessary arguments are just ignored. This behavior won't change.
The text was updated successfully, but these errors were encountered: