Hi Linda, The way I remember this effect is to imagine that when you define a verb tacitly the last step is to parenthesize it in your mind.
So, > enc =: ;@:(</.~ 0 1 2 1 $~ #) becomes > enc =: (;@:(</.~ 0 1 2 1 $~ #)) and stays the same, while > ;(</.~ (0 1 2 1 $~ #))A works as expected applying the verbs in sequence, while > enc2 =: ;(</.~ 0 1 2 1 $~ #) becomes > enc2 =: (;(</.~ 0 1 2 1 $~ #)) and you now have a hook where ; takes the original argument on its left side and the 'processed' argument from the right side. Different results! Cheers, bob On Jan 7, 2015, at 11:31 PM, Linda Alvord <[email protected]> wrote: > > > This is odd, Pascal > > > > Remove @: in one situation and the results agree. However in a defined verb > they don't agree. > > > > A=:'hi ho how are you?' > > enc =: ;@:(</.~ 0 1 2 1 $~ #) > > enc > > ;@:(</.~ (0 1 2 1 $~ #)) > > > > ;@:(</.~ (0 1 2 1 $~ #))A > > howeuih o r o? hay > > > > ;(</.~ (0 1 2 1 $~ #))A > > howeuih o r o? hay > > > > > > enc2 =: ;(</.~ 0 1 2 1 $~ #) > > enc2 A > > -------------------T-----T---------T----┐ > > │hi ho how are you?│howeu│ih o r o?│ hay│ > > L------------------+-----+---------+----- > > > > Linda > > > > > > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of 'Pascal > Jasmin' via Programming > Sent: Wednesday, January 7, 2015 11:43 PM > To: Programming forum > Subject: [Jprogramming] Rail Fence Cipher > > > > from > > > <http://www.reddit.com/r/dailyprogrammer/comments/2rnwzf/20150107_challenge_ > 196_intermediate_rail_fence/> > http://www.reddit.com/r/dailyprogrammer/comments/2rnwzf/20150107_challenge_1 > 96_intermediate_rail_fence/ > > > > enc =: ;@:(</.~ 0 1 2 1 $~ #) > > > > is a pretty elegant > > > > > > ;@:(</.~ 0 1 2 1 $~ #) 'These words will be SCRAMBLED' Terw SMDhs od ilb > CABEewsleRL > > > > > > decode code is ommitted but can be found at link > > dec ;@:(</.~ 0 1 2 1 $~ #) 'These words will be SCRAMBLED' > > These words will be SCRAMBLED > > ---------------------------------------------------------------------- > > For information about J forums see <http://www.jsoftware.com/forums.htm> > 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
