1
0
mirror of https://github.com/adambard/learnxinyminutes-docs.git synced 2025-07-31 12:00:34 +02:00

[apl/en] format correctly (#4938)

This commit is contained in:
Boris Verkhovskiy
2024-05-12 04:38:39 -06:00
committed by GitHub
parent a929a00571
commit f1a1fe071a

View File

@@ -1,6 +1,11 @@
⍝ These examples can be tested here:
⍝ http://ngn.github.io/apl/web/index.html
---
language: APL
contributors:
- ["nooodl", "https://github.com/nooodl"]
filename: learnapl.apl
---
```apl
⍝ Comments in APL are prefixed by ⍝.
⍝ A list of numbers. (¯ is negative)
@@ -17,7 +22,7 @@
⍝ All functions have single-argument and dual-argument
⍝ meanings. For example, "×" applied to two arguments
⍝ means multiply, but when applied to only a right-hand
⍝ means multiply, but when applied to only a right-hand
⍝ side, it returns the sign:
× ¯4 ¯2 0 2 4 ⍝ ¯1 ¯1 0 1 1
@@ -55,3 +60,4 @@ A ← 10 60 55 23
⍝ We can define this as a function using {} and ⍵:
mean ← {(+/⍵)÷⍴⍵}
mean A ⍝ 37
```