Another couple of improvements, as an adverb: 'h' 'M' 1 : '( ~: (#!. m)inv -.~ )' A
but its probably better as a verb: 'hM' 4 : '((r ~:]) (#!. w) inv r -.~ ]) y [ ''r w'' =. x' A Mouse on Mill I'm not sure it can be made tacit. 2 6 (4 : '((r ~:]) (#!. w) inv r -.~ ]) y [ ''r w'' =. x') 3 4 5 2 1 1 2 3 4 5 6 1 1 6 (4 : '((r ~:]) (#!. w) inv r -.~ ]) y [ ''r w'' =. x')each/(>@:) 3 6 ; 2 6; 3 4 5 2 1 1 2 6 4 5 6 1 1 6 ----- Original Message ----- From: 'Pascal Jasmin' via Programming <[email protected]> To: "[email protected]" <[email protected]> Cc: Sent: Wednesday, May 14, 2014 11:18:18 AM Subject: Re: [Jprogramming] Substitution with under there is also this version which avoids precalculating B (('h'~:]) (#!.'M') inv 'h' -.~ ]) A Mouse on Mill 'h' (([ ~:]) (#!.'M') inv [ -.~ ]) A Mouse on Mill and then: 'h' 'M' 1 : '(([ ~:]) (#!. m) inv [ -.~ ])' A Mouse on Mill ----- Original Message ----- From: 'Pascal Jasmin' via Programming <[email protected]> To: "[email protected]" <[email protected]> Cc: Sent: Wednesday, May 14, 2014 10:58:44 AM Subject: Re: [Jprogramming] Substitution with under fascinating, 1 0 1 # inv 3 3 0 3 1 0 1 #!. 2 inv 3 3 2 3 1 0 1 #!. 2 inv 3 3 3 |length error 1 0 1 #!. 2 inv 3 4 3 2 4 (B&(#!.'M')) A ouse on ill which is the length of +/ B, which is required to not produce the above length error these also provide same result. ( ,&.(B&(#!.'M'))) A ( ]&.(B&(#!.'M'))) A Any reason not to prefer the last one to your version? Why use monadic [ instead of ]? ----- Original Message ----- From: David Lambert <[email protected]> To: programming <[email protected]> Cc: Sent: Wednesday, May 14, 2014 10:23:58 AM Subject: [Jprogramming] Substitution with under NB. New substitution? Surely someone can verbalize this. A =: 'house on hill' B =: 'h' ~: A [&.(B&(#!.'M')) A Mouse on Mill ---------------------------------------------------------------------- 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
