Manuals/calci/ARRAYFY
Jump to navigation
Jump to search
ARRAYFY(function,argumentmask)
Description
- Arrayfies a function to allow it to handle array parameters. Argumentmask is an array that indicates which of the parameters should be treated as a single array, rather than be used to invoke combinatorial arguments.
- functionname⩨argumentmask also invokes the same function (e.g., distance ⩨ or distance ⩨[1])
Examples
Distance
distance:=speed*time;
ARRAYFY(distance)
distance(1..2,2..3)
speed time distance
1 2 2
1 3 3
2 2 4
2 3 6
Area Of Circle
units.on;
AreaOfCircle:=π*r^2;
AreaOfCircle#;
AreaOfCircle((1..123)<>m)
r AreaOfCircle 1m 3.141592653589793m2 2m 12.566370614359172m2 3m 28.274333882308138m2 4m 50.26548245743669m2 5m 78.53981633974483m2 6m 113.09733552923255m2 7m 153.93804002589985m2 8m 201.06192982974676m2 9m 254.46900494077323m2 10m 314.1592653589793m2 11m 380.132711084365m2 12m 452.3893421169302m2 13m 530.929158456675m2 14m 615.7521601035994m2 15m 706.8583470577034m2 16m 804.247719318987m2 17m 907.9202768874502m2 18m 1017.8760197630929m2 19m 1134.1149479459152m2 20m 1256.6370614359173m2 21m 1385.4423602330987m2 22m 1520.53084433746m2 23m 1661.9025137490005m2 24m 1809.5573684677208m2 25m 1963.4954084936207m2 26m 2123.7166338267m2 27m 2290.221044466959m2 28m 2463.0086404143976m2 29m 2642.079421669016m2 30m 2827.4333882308138m2 31m 3019.0705400997913m2 32m 3216.990877275948m2 33m 3421.194399759285m2 34m 3631.681107549801m2 35m 3848.4510006474966m2 36m 4071.5040790523717m2 37m 4300.840342764427m2 38m 4536.459791783661m2 39m 4778.362426110075m2 40m 5026.548245743669m2 41m 5281.017250684442m2 42m 5541.769440932395m2 43m 5808.804816487527m2 44m 6082.12337734984m2 45m 6361.725123519331m2 46m 6647.610054996002m2 47m 6939.778171779853m2 48m 7238.229473870883m2 49m 7542.9639612690935m2 50m 7853.981633974483m2 SHOW 50 MORE (73 HIDDEN) SHOW ALL
See Also