bug-apl
[Top][All Lists]
Advanced

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

Re: [Bug-apl] Question about behavior of ⍋


From: Juergen Sauermann
Subject: Re: [Bug-apl] Question about behavior of ⍋
Date: Tue, 08 Jul 2014 12:45:09 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130330 Thunderbird/17.0.5

Hi Elias,

nice trick!

/// Jürgen


On 07/08/2014 08:58 AM, Elias Mårtenson wrote:
By the way, I found a workaround to the string ordering. The workaround requires memory on the order of ↑(⍴V)×⌈/⍴¨V for a vector V. This should be enough justification for the proposed extension.

Here's what I do: instead of doing the following:

      z[⍋z←'foo' 'bar' 'test' 'aaaaaa']
┌→──────────────────────────┐
│┌→──┐ ┌→──┐ ┌→───┐ ┌→─────┐│
││bar│ │foo│ │test│ │aaaaaa││
│└───┘ └───┘ └────┘ └──────┘│
└∊──────────────────────────┘

I do this:

      z[⍋⊃z←'foo' 'bar' 'test' 'aaaaaa']
┌→──────────────────────────┐
│┌→─────┐ ┌→──┐ ┌→──┐ ┌→───┐│
││aaaaaa│ │bar│ │foo│ │test││
│└──────┘ └───┘ └───┘ └────┘│
└∊──────────────────────────┘

Regards,
Elias







reply via email to

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