A good way to pipeline is to use [: . Try h = [: }. [: ; ;"0 Sent from my iPad
On Sep 10, 2012, at 2:20 PM, "Peter B. Kessler" <peter.b.kess...@oracle.com> wrote: > I'm still at the stage where I have to read the dictionary entry for most of > the verbs, so I'm not even in the slow lane yet. Looking at Stitch (dyadic > ,.)[1] I was reminded of the explanation of u"_1, which suggested using Link > (dyadic ;)[2] > > g =: }. @ (; @ (;"_1)) > ' ' g t > alpha bravo chuck > LF g t > alpha > bravo > chuck > > if you like "pipelining" your verbs. (The outer set of parens aren't needed > in g , but that's a subtly different pipeline.) > > ... peter > > [1] http://www.jsoftware.com/docs/help701/dictionary/d321.htm > [2] http://www.jsoftware.com/docs/help701/dictionary/d330.htm > > Linda Alvord wrote: >> In the slow lane, here's a version without @ or &. or even inv . >> t=: 'alpha' ; 'bravo' ; 'chuck' >> }.@((<' ') ;@,. ]) t >> alpha bravo chuck >> }: ; t,&.> ' ' >> alpha bravo chuck >> }.(<' ')([:;,.) t >> alpha bravo chuck >> Linda >> -----Original Message----- >> From: programming-boun...@forums.jsoftware.com >> [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Linda Alvord >> Sent: Friday, September 07, 2012 4:07 PM >> To: programm...@jsoftware.com >> Subject: Re: [Jprogramming] Flattening a list containing boxed elements >> Thanks, After I sent the message it rankled me that it might be a problem of >> rank. >> Linda >> -----Original Message----- >> From: programming-boun...@forums.jsoftware.com >> [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Dan Bron >> Sent: Friday, September 07, 2012 12:35 PM >> To: programm...@jsoftware.com >> Cc: <programm...@jsoftware.com> >> Subject: Re: [Jprogramming] Flattening a list containing boxed elements >> Rank. All definitions in the DoJ are subject to considerations of rank, >> though this often -forgive the pun- tacit. NB. vi (v x) >> u (v y) >> glue =: dyad def '< (> x) , (> y)' >> NB. Rank zero here is key >> ; z glue"0 ' ' alpha bravo chuck >> -Dan >> Please excuse typos; composed on a handheld device. >> On Sep 7, 2012, at 11:22 AM, "Linda Alvord" <lindaalv...@verizon.net> wrote: >>> Now what am I missing? >>> ; z ,&.> ' ' alpha bravo chuck >>> >>> NB. x u&.v y ↔ vi (v x) u (v y) >>> >>> ;<(>z),>' ' >>> alpha >>> bravo >>> chuck >>> >>> Linda >>> >>> -----Original Message----- >>> From: programming-boun...@forums.jsoftware.com [mailto:programming- >>> boun...@forums.jsoftware.com] On Behalf Of Linda Alvord >>> Sent: Friday, September 07, 2012 11:00 AM >>> To: programm...@jsoftware.com >>> Subject: Re: [Jprogramming] Flattening a list containing boxed elements >>> >>> Chuck caused grief! >>> >>> -----Original Message----- >>> From: programming-boun...@forums.jsoftware.com >>> [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Dan Bron >>> Sent: Friday, September 07, 2012 9:24 AM >>> To: programm...@jsoftware.com >>> Cc: <programm...@jsoftware.com> >>> Subject: Re: [Jprogramming] Flattening a list containing boxed elements >>> >>> There are more issues than that. For example, try it with "chuck" instead >>> of "charlie". >>> >>> Also, since > is a scalar verb, the "0 is superfluous. Also, the ,' ' >>> appends spaces not to the individual words, but to the entire array, so >>> that they all end up trailing, instead of interspersed as desired (the >>> spaces which separate the words in Linda's final result are an >>> [undependable] side-effect of >, and the experiment suggested above may >>> hint at their origin). >>> >>> But, like newcomer to a foreign tongue, Linda has certainly made herself >>> understood, and the idea is spot on, even if the words aren't exact. >>> Certainly we do want to: >>> >>>> get inside >>> "0 each box >>> ,' ' append a space >>> , and string the whole thing together. >>> >>> A native speaker might have said ; z ,&.> ' ' (and a fastidious speaker >>> would prepend a }: ). >>> >>> -Dan >>> >>> Please excuse typos; composed on a handheld device. >>> >>> On Sep 7, 2012, at 8:02 AM, "R.E. Boss" <r.e.b...@planet.nl> wrote: >>> >>>> z=: 'alpha' ; 'bravo' ; 'charlie' >>>> >>>> ' '=,(>"0 z),' ' >>>> 0 0 0 0 0 1 1 0 0 0 0 0 1 1 0 0 0 0 0 0 0 1 1 1 1 1 1 1 >>>> >>>> ' '=;:^:_1 z >>>> 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 >>>> >>>> >>>> R.E. Boss >>>> >>>> >>>>> -----Oorspronkelijk bericht----- >>>>> Van: programming-boun...@forums.jsoftware.com >>> [mailto:programming-boun...@forums.jsoftware.com] Namens Linda Alvord >>>>> Verzonden: vrijdag 7 september 2012 12:50 >>>>> Aan: 'Programming forum' >>>>> Onderwerp: Re: [Jprogramming] Flattening a list containing boxed elements >>>>> >>>>> Did I miss this somewhere? An alternative without inv. >>>>> >>>>> ,(>"0 z),' ' >>>>> alpha bravo charlie >>>>> >>>>> Linda >>>>> >>>>> >>>> >>>> --------------------------------------------------------------------- >>>> - 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 >> ---------------------------------------------------------------------- >> 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 ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm