Two thoughts about this thread:

  Where is the tie in the tree?
  A little shorter mat.

   bill=:,:`]@.(<:@#@$)
   bill 'ab'
ab
   5!:5 <'bill'
,:`]@.(<:@#@$)
   5!:4 <'bill'
             ┌─ ,:      
       ┌─────┴─ ]       
       │           ┌─ <:
── @. ─┤     ┌─ @ ─┴─ # 
       └─ @ ─┴─ $       
   
   mat
(_2 {. 1 1 , $) $ ]
   mat2
] $~ _2 {. 1 1 , $
   

Linda
-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of 'Pascal Jasmin' 
via Programming
Sent: Saturday, October 3, 2015 12:29 PM
To: [email protected]
Subject: Re: [Jprogramming] problem using ,:`]@.

 g^:f  as if in J is one of the cooler patterns of the language.
if. 1 = f(y) do. g(y) else. y end.
      From: Nollaig MacKenzie <[email protected]>
 To: [email protected]
 Sent: Saturday, October 3, 2015 1:06 AM
 Subject: Re: [Jprogramming] problem using ,:`]@.
   
fie is my preference, I think - I wouldn't have thought of getting a no-op by 
doing an op 0 times :-)

fum looked perverse at first, but quickly became intriguing. It would have 
other uses:

fum (2 3$'abcdef'),:2 3$'UVWXYZ'





On 2015.10.02 21:48:39, you,
 the extraordinary Raul Miller, spake thus:

> It sounds like you are asking for this:
> 
>    fie=: ,:^:(2>#@$)
> 
> but you might want to consider alternatives such as:
> 
>    foe=: , $~ _2{.1,$
> 
> or
> 
>    fum=: ,.&.|:
> 
> Good luck,
> 
> --
> Raul

--
Nollaig MacKenzie
http://www.yorku.ca/nollaig
----------------------------------------------------------------------
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