Skip to content

Commit

Permalink
fix broken code
Browse files Browse the repository at this point in the history
  • Loading branch information
abrudz authored Aug 15, 2024
1 parent d9d6e7e commit 0e7535e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions docs/broken-keyboard-problems.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ For each of the following problems:

???Example "Answer"
```APL
{⍵[(≢⍵)-⍳≢⍵]}
{⍵[(⍴⍵)-⍳⍴⍵]}
{⍵[1+(≢⍵)-⍳≢⍵]}
{⍵[1+(⍴⍵)-⍳⍴⍵]}
```

To model the reverse-first function `⊖⍵`, we should use **squad** `⍺⌷⍵` - the indexing function - to select major cells from our argument regardless of rank.
Expand All @@ -89,8 +89,7 @@ For each of the following problems:

???Example "Answer"
```APL
alph ← 'abcdefghijklmnopqrstuvwxyz'
ToUpper ← {(⎕A,' ')[⍺⍳⍵]}
ToUpper ← {(⎕A,' ')['abcdefghijklmnopqrstuvwxyz'⍳⍵]}
```

To learn about case folding and mapping using the case conversion system function `⎕C`, watch the webinar [Language Features of Dyalog version 18.0 in Depth - Part 1](https://dyalog.tv/Webinar/?v=Hln3zryunsw).
Expand Down

0 comments on commit 0e7535e

Please sign in to comment.