Docs for funct keyword

This commit is contained in:
John Kerl 2021-12-25 12:51:44 -05:00
parent 17524b76cc
commit 6ff686fa8f
11 changed files with 59 additions and 1 deletions

View file

@ -0,0 +1 @@
mlr --from test/input/abixy put -f ${CASEDIR}/mlr

View file

View file

@ -0,0 +1,10 @@
a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533,d=0.8052985815845617
a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797,d=0.9209978658539777
a=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776,d=0.3953756915115773
a=eks,b=wye,i=4,x=0.38139939387114097,y=0.13418874328430463,d=0.40431685157744135
a=wye,b=pan,i=5,x=0.5732889198020006,y=0.8636244699032729,d=1.036584492737304
a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697,d=0.7218928080781029
a=eks,b=zee,i=7,x=0.6117840605678454,y=0.1878849191181694,d=0.6399847495033941
a=zee,b=wye,i=8,x=0.5985540091064224,y=0.976181385699006,d=1.1450751065334548
a=hat,b=wye,i=9,x=0.03144187646093577,y=0.7495507603507059,d=0.750209926579025
a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864,d=1.0770861812414247

View file

@ -0,0 +1,9 @@
func f(x) {
return sqrt(x)
};
func g(num a, num b, funct f) :num {
return f(a**2+b**2)
};
$d = g($x, $y, f);