If I have a function FIB:

    ∇
[0]   R←FIB N
[1]   R←0 1
[2]   →(N≤¯1+⍴R)/5
[3]   R←R,+/¯2↑R
[4]   →2
[5]   R←R[N+1]
    ∇

and use ⍤ on it to produce a vector of the fibonacci series from 0 to 9:

      (FIB⍤0) ¯1+⍳10
INDEX ERROR+
FIB[5]  R←R[N+1]
          ^^

However:

      (FIB⍤0) 0 1 2 3 4 5 6 7 8 9 
0 1 1 2 3 5 8 13 21 34
      (FIB⍤0) (¯1+⍳10)
0 1 1 2 3 5 8 13 21 34
      FIB⍤0 (¯1+⍳10)
0 1 1 2 3 5 8 13 21 34

Best regards,
Louis


Reply via email to