Includes languages derived from APL
- Docs
- Development Environments > JDoodle
-
My initial trial to code in APL and J (with Perplexity)
-
APL is an ancestor of functional programming languages released in the 1950s. It presents difficulties not only due to its strange syntax but also because it uses special keywords not supported by modern standard keyboards. The derivative language J alleviates these difficulties by using ASCII characters.
-
Code and Output
APL : CalcAvg.apl
avg ← {(+⌿⍵)÷≢⍵} ⍝ Define a function to calculate the average avg 1 2 3 4 5 ⍝ Calculate the average of the array
3
J : CalcAvg.ijs
avg =: +/ % # NB. Define a function to calculate the average echo avg 1 2 3 4 5 NB. Calculate the average of the array
3