On Dec 25, 2007 3:40 AM, Mark D. Niemiec <[EMAIL PROTECTED]> wrote:
> fork2 =: 2 : ('(u y)[EMAIL PROTECTED] [EMAIL PROTECTED] y';':';'(x u
> y)[EMAIL PROTECTED] x [EMAIL PROTECTED] y')
> fork1 =: 2 : 'fork2(u`v)'
> fork =: 1 : 'fork1 u'
> +/ % # fork 1 2 3 6
> 3
Nice.
Or, if you do not mind using `:6 (which happens to
currently be implemented so it produces something
with the train syntax linear representation):
F=:1 :'2 :''2 :''''u`n`:6''''(u`v)''u'
+/ % # F 1 2 3
2
+/ % # F
+/ % #
% # F
2 : 'u`n`:6'(;:'%#')
--
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm