Yes, but it has to form one of two patterns:
- A 3-train (fork)
Agh
- A function with a bound argument
A∘g
A 3-train (fork) Agh
This is an array A
, a function g
, and a function h
, where h
is applied monadically to the overall argument, and g
is applied dyadically to the result of g
, with A
as g
's left argument. Since ,/
is dyadic with the 2
as left argument, we have an extra function h
pre-processing the argument. We don't need any pre-processing, so we use an identity function:
v←⍳5
f←2,/⊢
f
┌─┼──┐
2 ,/ ⊢
f v
┌───┬───┬───┬───┐
│1 2│2 3│3 4│4 5│
└───┴───┴───┴───┘
More about Forks on APL Wiki.
A function with a bound argument A∘g
Here, we use the Bind operator ∘
to curry a constant argument to a dyadic function. Our constant is 2
and the function g
is ,/
but since operators like /
have long left scope 2∘,/
would be parsed as (2∘,)/
which isn't what we want, so we have to parenthesise ,/
:
v←⍳5
f←2∘(,/)
f
∘
┌┴┐
2 ,/
f v
┌───┬───┬───┬───┐
│1 2│2 3│3 4│4 5│
└───┴───┴───┴───┘
More about Bind on APL Wiki.