APL
GNU APL
Installation
Arch Linux
pacman -S gnu-apl
Source Code
# Download php-{version}.tar.gz from https://www.gnu.org/software/apl/
./configure [options]... [VAR=VALUE]...
make
make install
Examples
Fibonacci Numbers
#!/usr/bin/apl --script
∇R←fib N
→L+(N>1)
L:R←N ⋄ →0
R←(fib (N - 2)) + fib (N - 1)
∇
fib ⍎⍕¯1↑⎕ARG
)OFF
⍝ example
⍝ run:
⍝ ./fib.apl -- 20
Matrix form
#!/usr/bin/apl --script
∇R←fib N
R←↑0 1↓↑+.×/N/⊂2 2⍴1 1 1 0
∇
fib ⍎⍕¯1↑⎕ARG
)OFF
⍝ example
⍝ run:
⍝ ./fib.apl -- 39
Dyalog
Installation
Alma Linux
# Download {os}_{bit}_{version}_unicode_{arch}.rpm
dnf install {os}_{bit}_{version}_unicode_{arch}.rpm
Examples
Fibonacci Numbers
fib←{⍵<2:⍵ ⋄ (∇⍵-1)+∇⍵-2}
fib 39