bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-apl] Non-bug: Help comparing solutions


From: Jay Foad
Subject: Re: [Bug-apl] Non-bug: Help comparing solutions
Date: Wed, 5 Mar 2014 10:36:36 +0000

> Out of curiosity, do you have a good solution without the use of a lambda?
> "pure SO APL" if you like.

I don't know how to do it in GNU APL. In Dyalog you can play silly
games with ∘ (function composition) and ⍨, e.g.:

      ⎕ML←1 ⍝ ↑ is mix and ↓ is split
      ↑(⌷⍨∘(⊂∘⍋))⍨¨↓X ⍝ N.B. ⍵[⍋⍵] ←→ (⊂⍋⍵)⌷⍵
xz
xz
ab
ab

(Dyalog version 14, currently in beta release, supports the rank
operator so you will be able to use it instead of split and mix.)

Jay.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]