On Sat, Jan 10, 2009 at 5:20 AM, Matthew Brand <[email protected]> wrote: > ins1 =: (4 : '(x&#)&.|: x # y') > > Can anybody help me with a common problem I run into when trying to do > things using tacit expressions?
ins1 can not be easily converted to tacit, because it forms a verb which must incorporate x. But you can avoid this issue by rephrasing it: ins2=: 4 :'|:x#|: x # y' At this point, creating a tacit expression is trivial ins3 =: 13 :'|:x#|: x # y' ins3 [: |: [ # [: |: # (Note that I have J configured to show expressions in linear form.) Personally, however, I prefer to express tacit verbs slightly differently: ins4=: |:@[ # |:@# That might be a bit of a leap, an intermediate form would be: ins3a=: [: |: [ # |:@# Anyways, when I see [: being used to merge two verbs and the right verb has infinite rank, I prefer to rephrase using the more concise @ If nothing else this helps me engage my brain, instead of me just staring at a line of text. P,S. I did not show my testing, here, but I tested each of these definitions, using expressions somewhat like: 1 1 1 1j1 1 ins5 >:i.5 5 -- Raul ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
