On Mon, Dec 10, 2012 at 5:33 AM, Doug McIlroy <doug@cs.dartmouth.edu> wrote:
> >   Matlab exploits them heavily (though represented as doubles).

> Not sure what you are referring to

I had in mind Matlab's frequent use of a Boolean array as
a characteristic function describing some property of the
elements of another array.  Such arrays are used to control
other array operations. In this usage, the characteristic
array may be optimized out of existense, but it fosters
higher-level thinking and concise code.

In which case it goes back to APL's compress operator ie 1960.
http://www.aplusdev.org/APlusRefV2_8.html#HEADING179

Heres a session that demonstrates

     A+
     Copyright (c) 1990-2008 Morgan Stanley.  All rights reserved.
     This version is Release 4.22
     a ← 1 2 3 4 5
     b ← 1 0 1 1 0
     b/a
 1 3 4
     b ← 1 0 2 1 0
     b/a
 1 3 3 4



--
http://www.the-magus.in
http://blog.languager.org