Sometimes this looks better than others.

   f=:(, ({: + [: {: }:))^:((2 -~ ])`([: * 2 # ]))
   
   f 6
1 1 2 3 5 8
   
   5!:4 <'f'
         -- ,           
         │   -- {:      
       --+   +- +       
       │ L---+     -- [:
       │     L-----+- {:
       │           L- }:
-- ^: -+     -- 2       
       │ ----+- ~ --- - 
       │ │   L- ]       
       │ │              
       L-+   -- [:      
         │   +- *       
         L---+     -- 2 
             L-----+- # 
                   L- ] 

Linda

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Linda Alvord
Sent: Saturday, June 08, 2013 3:18 AM
To: [email protected]
Subject: [Jbeta] a ds mystery

What will unlock more of the mysteries of Fibonacci?

Run this in  jqt  and it works, but is "tight lipped" about its secrets:

require '~addons/debug/dissect/dissect.ijs'

f=:(, ({: + [: {: }:))^:((2 -~ ])`([: * 2 # ]))

f 6

5!:4 <'f'

ds '(, ({: + [: {: }:))^:((2 -~ ])`([: * 2 # ]))6'


Now try it in   jhs  and it looks like this :

require '~addons/debug/dissect/dissect.ijs'
   
   f=:(, ({: + [: {: }:))^:((2 -~ ])`([: * 2 # ]))
   
   f 6
1 1 2 3 5 8
   
   5!:4 <'f'
         -- ,           
         │   -- {:      
       --+   +- +       
       │ L---+     -- [:
       │     L-----+- {:
       │           L- }:
-- ^: -+     -- 2       
       │ ----+- ~ --- - 
       │ │   L- ]       
       │ │              
       L-+   -- [:      
         │   +- *       
         L---+     -- 2 
             L-----+- # 
                   L- ] 
   
   ds '(, ({: + [: {: }:))^:((2 -~ ])`([: * 2 # ]))6'
|value error: wd
|       wd;<@(#~-.@('fmshowerror'&(+./@:E.)));.2^:(-.crashed)DISSECT
   
What is interesting is that the tree has no sign of  `  (tie) anywhere.
Maybe the error message means something to you Henry.

Linda
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to