J is perfect for thinking out-of-the-box.

   ((],~ ';',~ [)`,@.(={.))/&.(":&.(,. :. ,) :.".) 0 1 0 1 1 1 0 0
+-+-+-+---+-+
|0|1|0|111|0|
+-+-+-+---+-+


R.E. Boss


-----Original Message-----
From: Programming <[email protected]> On Behalf Of xash
Sent: donderdag 21 oktober 2021 19:18
To: [email protected]
Subject: Re: [Jprogramming] segregation boxing on bitvectors

Oh, or even simpler I guess:

(<;.1~ 1, }.~:}:) 0 1 0 1 1 1 0 0

On Thu Oct 21, 2021 at 7:14 PM CEST, xash wrote:
> (</.~ [:+/\ 0, }.~:}:) 0 1 0 1 1 1 0 0
>
> On Thu Oct 21, 2021 at 7:01 PM CEST, Raoul Schorer wrote:
> > Hi,
> >
> > Really trivial question I am stuck on:
> >
> > given a bit vector
> > 0 1 0 1 1 1 0 0
> >
> > how to easily sequentially box 1s & 0s? Such as:
> > |0|1|0|1 1 1|0 0|
> >
> > Thanks!
> > Raoul
> > --------------------------------------------------------------------
> > -- For information about J forums see 
> > http://www.jsoftware.com/forums.htm
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm

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

Reply via email to