"pasting error, those are 2 lines"
Thanks Pascal, for some reason they morphed into one in the forum archive
[0].
"
(+:`-:AltM)("1) 3 3 3$1 2 3 4
2 1 6
8 0.5 4
6 2 2
4 1.5 8
2 1 6
8 0.5 4
6 2 2
4 1.5 8
2 1 6
"
In that case, the following definition is quite similat to AltM,
altm=. ((;.1) (1:`) (`]) (`:6) (;@:)) (($`$)`) (`:6)
u altm
$ $ ;@:(1: u;.1 ])
+:`-: altm
$ $ ;@:(1: +:`-:;.1 ])
+:`-: altm 1 2 3 4
2 1 6 2
+:`-: altm("1) 3 3$ 1 2 3 4
2 1 6
8 0.5 4
6 2 2
+:`-: altm("1) 3 3 3$ 1 2 3 4
2 1 6
8 0.5 4
6 2 2
4 1.5 8
2 1 6
8 0.5 4
6 2 2
4 1.5 8
2 1 6
Though, it is not equivalent,
(+:&.:>)`(-:&.:>) altm <("1) 3 3$1 2 3 4
2 4 6
2 0.5 1
6 8 2
[0] [Jprogramming] strand notation tools
http://www.jsoftware.com/pipermail/programming/2016-December/046241.html
On Tue, Dec 20, 2016 at 1:09 PM, 'Pascal Jasmin' via Programming <
[email protected]> wrote:
>
>
>
> pasting error, those are 2 lines
>
> lr_z_ =: 3 : '5!:5 < ''y'''
>
> daF =: 1 : 'a =. (''2 : '', (quote m) , '' u'') label_. 1 : (''u 1 :'' ,
> quote a)'
>
>
> (+:`-:AltM)("1) 3 3 3$1 2 3 4
> 2 1 6
> 8 0.5 4
> 6 2 2
>
> 4 1.5 8
> 2 1 6
> 8 0.5 4
>
> 6 2 2
> 4 1.5 8
> 2 1 6
> ________________________________
> From: Jose Mario Quintana <[email protected]>
> To: Programming forum <[email protected]>
> Sent: Monday, December 19, 2016 7:21 PM
> Subject: Re: [Jprogramming] strand notation tools
>
>
> I tried to run your script but I was not able to go very far:
>
> JVERSION
> Engine: j805/j64/windows
> Beta-12: commercial/2016-09-30T15:50:47
> Library: 8.05.09
> Qt IDE: 1.5.2/5.6.1
> Platform: Win 64
> Installer: J805 install
> InstallPath: g:/program files/j
> Contact: www.jsoftware.com
>
>
> isNoun =: (0 = 4!:0 ::0:)@:<
> isgerund =: 0:`(0 -. at e. 3 : ('y (5!:0)';'1')"0)@.(0 < L.) :: 0:
> isgerundA =: 1 : ' if. isNoun ''u'' do. isgerund m else. 0 end.'
> eval =: 1 : ' a: 1 : m'
> ar =: 1 : '5!:1 <''u'''
> aar =: 1 : 'if. isNoun ''u'' do. q =. m eval else. q =. u end. 5!:1 <
> ''q'' '
>
> tie =: 2 : 'if. u isgerundA do. if. v isgerundA do. m ar , v ar else. m
> , v ar end. else. if. v isgerundA do. u ar , n else. u ar , v ar end. end.
> '
> tieA =: 2 : 'if. u isgerundA do. if. v isgerundA do. m ar , v ar else.
> m , v aar end. else. if. v isgerundA do. u aar , n else. u aar , v aar
> end. end. '
>
>
> + tie '/'
> ┌─┬─────┐
> │+│┌─┬─┐│
> │ ││0│/││
> │ │└─┴─┘│
> └─┴─────┘
>
>
> + tieA '/\'
> ┌─┬─────────┐
> │+│┌─┬─────┐│
> │ ││4│┌─┬─┐││
> │ ││ ││/│\│││
> │ ││ │└─┴─┘││
> │ │└─┴─────┘│
> └─┴─────────┘
>
>
> lr_z_ =: 3 : '5!:5 < ''y'''daF =: 1 : 'a =. (''2 : '', (quote m) , ''
> u'') label_. 1 : (''u 1 :'' , quote a)'
> |value error
> | a=.('2 : ',(quote m),' u')
>
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm