Yup. From the |. page
<http://www.jsoftware.com/help/dictionary/d231.htm>in the dictionary:
The phrase x |.!.f y produces a *shift*: the items normally brought around
by the cyclic rotation are replaced by the atom f unless f is empty (0=#f), in
which case they are replaced by the normal fill defined under Take
({.)<http://www.jsoftware.com/help/dictionary/d521.htm>
:
On Thu, Nov 17, 2011 at 2:35 PM, Raul Miller <[email protected]> wrote:
> I hadn't noticed that an empty fill would give me the default.
>
> Thanks,
>
> --
> Raul
>
> On Thursday, November 17, 2011, Roger Hui <[email protected]>
> wrote:
> > How is this different from the primitive?
> >
> > 2 |.!.'' i.5 5
> > 10 11 12 13 14
> > 15 16 17 18 19
> > 20 21 22 23 24
> > 0 0 0 0 0
> > 0 0 0 0 0
> > 2 |.!.'' 5 7$'deipnosophist'
> > eipnoso
> > phistde
> > ipnosop
> >
> >
> >
> >
> >
> > On Thu, Nov 17, 2011 at 12:52 PM, Raul Miller <[email protected]>
> wrote:
> >
> >> shift=: 4 :0
> >> fill=. {.0#,y
> >> x |.!.fill y
> >> )
> >>
> >> For example: 2 shift i.5 5
> >>
> >>
> >> --
> >> Raul
> >> ----------------------------------------------------------------------
> >> 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