[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.
- [Bug-apl] Non-bug: Help comparing solutions, Elias Mårtenson, 2014/03/05
- Re: [Bug-apl] Non-bug: Help comparing solutions, Elias Mårtenson, 2014/03/05
- Re: [Bug-apl] Non-bug: Help comparing solutions, Jay Foad, 2014/03/05
- Re: [Bug-apl] Non-bug: Help comparing solutions, Elias Mårtenson, 2014/03/05
- Re: [Bug-apl] Non-bug: Help comparing solutions,
Jay Foad <=
- Re: [Bug-apl] Non-bug: Help comparing solutions, Daniel H. Leidisch, 2014/03/05
- Re: [Bug-apl] Non-bug: Help comparing solutions, Elias Mårtenson, 2014/03/05
- Re: [Bug-apl] Non-bug: Help comparing solutions, Tobia Conforto, 2014/03/05
- Re: [Bug-apl] Non-bug: Help comparing solutions, Elias Mårtenson, 2014/03/05
- Re: [Bug-apl] Non-bug: Help comparing solutions, Jay Foad, 2014/03/06
- Re: [Bug-apl] Non-bug: Help comparing solutions, Daniel H. Leidisch, 2014/03/06