Skip to content

Latest commit

 

History

History
49 lines (37 loc) · 2 KB

File metadata and controls

49 lines (37 loc) · 2 KB

Includes languages derived from APL

References

<List>

  • My initial trial to code in APL and J (with Perplexity)

  • Run with APL 1.8 and J 9.01.10 in JDoodle

  • 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