|
From: | Juergen Sauermann |
Subject: | Re: [Bug-apl] How to zero every other 1 in a sequence |
Date: | Fri, 21 Mar 2014 15:04:37 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130330 Thunderbird/17.0.5 |
Hi, extending Kacper's idea, you could also try: (X/X)←∈(⍴¨X⊂X)⍴¨⊂1 0 It is a bit longer but may be faster because it avoids \. /// Jürgen On 03/20/2014 08:08 PM, Kacper Gutowski wrote:
On 2014-03-21 00:23:41, Elias Mårtenson wrote:One of my experiments was very short, and tantalisingly close to correct: ≠\V Unfortunately, it's not quite right. Does anyone have an idea how to coerce that one into being right?I couldn't come up with anything better, but if you don't mind having a separate statement with assignment in place you could do something like: (V/V)←∊≠\¨V⊂V -k
[Prev in Thread] | Current Thread | [Next in Thread] |