Current issue

Vol.26 No.4

Vol.26 No.4

Volumes

© 1984-2017
British APL Association
All rights reserved.

Archive articles posted online on request: ask the archivist.

archive/24/1

Volume 24, No.1

  • Proof for author
  • 1.1

In Session

Congratulations not in order?

Stephen Taylor (sjt@5jt.com)

The card popped out of its envelope bearing the single word Congratulations surrounded by what looked like anagrams of it.

This kind of thing preys on one’s mind. What was my sister thinking? I don’t have time on my birthday to stare at the phrases and decide whether they really are all anagrams or just look like they are, or just some of them are. Need to resolve this question quickly and get back to typesetting Vector

Let’s see… if we alphabetise… and ignore spaces…

      {⍵[⍋⍵]~' '}

then all that’s left is to compare the results…

      'congratulations'{⊃≡/{⍵[⍋⍵]~' '}¨⍺ ⍵}'iron nuts catalog'
1

Gluing on the left argument gets me a monadic test function.

  	  test←'congratulations'∘{⊃≡/{⍵[⍋⍵]~' '}¨⍺ ⍵}
      test¨↓⎕←↑ANAGRAMS
nora taunts logic
iron nuts catalog
using cool tartan
caution long star
stout groin canal
so not a garlic nut
ration aunts clog
uncool giant rats
auto girls cannot
tuscan train logo
trust colon again
groan until ascot
snail conga tutor
1 1 1 1 1 1 1 1 1 1 1 1 1

There we go. Anagrams tested, male autism appeased.

 

script began 17:34:03
caching off
debug mode off
cache time 3600 sec
indmtime not found in cache
cached index is fresh
recompiling index.xml
index compiled in 0.3011 secs
read index
read issues/index.xml
identified 26 volumes, 101 issues
array (
  'id' => '10500070',
)
regenerated static HTML
article source is 'XHTML'
completed in 0.3287 secs