APL2: "/" as Function 
Author Message
 APL2: "/" as Function

Comment on Greg Jaxon's comment during the ongoing discussion on sorting:

SHARE requirement 90404: Negative Left Argument for Partition:

The Partition primitive function should be modified to so that
the left argument will accept negative (integer) values,
with no other change to the defintion.

This would mean that:

       1  0 _1  0  1  Partition 'ABCDE'
or:
      _1  0 _1  0  1  Partition 'ABCDE'

would yield:

'AC'  'E'

That is, the elements corresponding to zeroes are deleted,
and a new element of the result is started whenever
an element of the left argument is greater than the preceding element.

Among other things, this would allow partition to be used as
a replacement for (non-Replicate) Compress.  That is:

      Enlist (-B) Partition V

would be equivalent to:

      B/V

for simple V.  This would mean that a primitive-based
Compress function, useable with, for example, Each,
would be available.

Idiom recognition could allow this to be efficient.



Wed, 06 Oct 1993 00:37:56 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. "entry-level" APL2 for OS/2

2. Help with an "unknown" APL2 symbol

3. string.join(["Tk 4.2p2", "Python 1.4", "Win32", "free"], "for")

4. Function names and "filter" function

5. BEGIN{want[]={"s1o", "s2o", "s2q", "s3q"}

6. Parsing ""D""?

7. "Fifth", "Forth", zai nar?

8. Ruby "finalize", "__del__"

9. beginners "let"/"random" question

10. ANNOUNCE: new "plus"- and "dash"-patches available for Tcl7.5a2/Tk4.1a2

11. Looking for "stdin", "stdout"

12. help with a j "split" function

 

 
Powered by phpBB® Forum Software