Pascal Jasmin wrote:
> a version that works with boxes and strings...
...
> (is there a way to factor out the @:] ...?)

Where b is a Boolean list and x0 and x1 are
lists of the same length,

  b{"_1 x0,.x1

will select atoms from x0 where b is 0 and from x1
where b is 1.

I've often wished that 0 (in the context of * and +)
and 1 (in the context of *) would retain their
normal identities in the context of literals and
boxes.  This would require literal and a box value
be identified to hold the value of 0 but would allow
Boolean masks to be used in those context.  But I
think I'm the only person crazy enough to imagine that
this would be a good idea, and even I am not sure what
a zero box should look like.

-- 
Raul

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to