120
edits
Miraheze>Adám Brudzewsky |
|||
(6 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
This page contains examples that show APL's strengths. The examples require minimal background and have no special dependencies. | This page contains examples that show APL's strengths. The examples require minimal background and have no special dependencies. If these examples are too simple for you, have a look at our [[advanced examples]]. | ||
[[ | |||
== Arithmetic mean == | == Arithmetic mean == | ||
Line 40: | Line 28: | ||
will transform a list of strings representing words into a comma-separated list: | will transform a list of strings representing words into a comma-separated list: | ||
<source lang=apl> | <source lang=apl> | ||
{⍺,', ',⍵}⌿'cow' 'sheep' 'cat' 'dog' | |||
┌────────────────────┐ | ┌────────────────────┐ | ||
│cow, sheep, cat, dog│ | │cow, sheep, cat, dog│ | ||
Line 145: | Line 133: | ||
=== Grille cypher === | === Grille cypher === | ||
A [ | A [[wikipedia:grille (cryptography)|grille]] is a 500 year old method for encrypting messages. | ||
[[File:Grille.png|none|500px|frameless | [[File:Grille.png|none|500px|frameless|The application of a grille cypher]] | ||
<p> | <p> | ||
Represent both the grid of letters and the grille as character matrices. | Represent both the grid of letters and the grille as character matrices. | ||
Line 171: | Line 159: | ||
</source> | </source> | ||
{{APL | {{APL development}} |