--- Raul Miller wrote: > On 8/6/07, Sherlock, Ric wrote: > > I'm not that keen on all the Caps in there. Can it be cleaned > > up/simplified more? > > A fork of the form > [: u v > > is equivalent to > u @: v > > Note however, that if v is a composite verb you usually need > to include it in parenthesis. <useful pointers deleted> > Hopefully, you can take it from there...
Yes thanks, I had tried substituting @: for [: but had got stuck on the brackets around v. I should have looked back at your earlier reply to a question of mine about [: & @: http://www.jsoftware.com/pipermail/programming/2007-July/007322.html So I get the following that are equivalent direxist1=: 'd' e."1 [: > [: , [: ({:"1) 1!:0@(fboxname&>)@(dropPS&.>)@boxopen direxist2=: 'd' e."1 >@:,@:({:"1@:(1!:0@(fboxname&>)@:(dropPS&.>)@:boxopen)) After all that I have to say I find the [: version easier to parse, and given that the only real difference is style (from earlier thread), I think I'm leaning towards the [: version. I suppose, in my original question, I wasn't really intending to restrict answers to using the operations/algorithm I had come up with. Are there other ideas of how to tacitly test for directory existence? > Note also that if you have linear display on, you can use > that to remind you where parenthesis are unnecessary Yes I currently like to have linear & boxed on together. ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
