Gave it a try:
x←6
y←⍳5
(2=⎕nc'x') →→ x⍴y ←→ ⍴y ←←
1 2 3 4 5 1
)erase x
(2=⎕nc'x') →→ x⍴y ←→ ⍴y ←←
5
tryit←{(2=⎕nc'x') →→ x⍴y ←→ ⍴y ←←}
===
SEGMENTATION FAULT
*** useless apl.lines (no CXXFLAGS=-rdynamic -gdwarf-2)
-
Hi Hendrik,
as far as I remember: in GNU APL a lambda is pretty much a regular
defined function.
A nomadic lambda is simply a dyadic lambda which test for the presence
for its left
argument (read: ⎕NC lambda = 2).Tour tryit needs to check that before ⍺
is referenced).
Best Regards,
Jürgen
Yes viz.:
tryit←{⍺ + ⍵ }
4 tryit 5
9
w
On 10/23/24 10:55, Henrik Moller wrote:
To all APLers: In GNU APL, is there any way to define an ambivalent
lambda? I.e., if you define a lambda
tryit←{...}
is there any way to make it work with both
tryit 1
and
1 tryit 2
To all APLers: In GNU APL, is there any way to define an ambivalent
lambda? I.e., if you define a lambda
tryit←{...}
is there any way to make it work with both
tryit 1
and
1 tryit 2
The Net has been unhelpful...
Thanks