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