Michal, Once you have what you want, you can use some tools to study it:
 
Change from a Noun to a verb, view its tacit version and apply it to data:
  
    dd=: 13 :'(y%2) > (?]) x$y'
   
    dd
(2 %~ ]) > [: (? ]) $
    
   7 dd 3
1 1 0
1 0 1
0 1 1
0 1 1
0 1 1
0 1 1
0 1 1

Both the boxed version and the tree can be helpful.
   

 5!:4 <'dd'
      -- 2      
  ----+- ~ --- %
  │   L- ]      
  +- >          
--+   -- [:     
  │   │     -- ?
  L---+-----+- ]
      L- $      

   5!:2 <'dd'
------------T-T------------┐
│--T-----T-┐│>│---T-----T-┐│
││2│--T-┐│]││ ││[:│--T-┐│$││
││ ││%│~││ ││ ││  ││?│]││ ││
││ │L-+--│ ││ ││  │L-+--│ ││
│L-+-----+--│ │L--+-----+--│
L-----------+-+-------------

Each in its own way will show you the forks and hooks.  You will begin to
see differences in the patterns of trees that are built from right to left
compared to those built from left to right.

Oddly, I can untangle code long before I can understand what it is doing.
Now I'm ready to try to follow your thinking as it applies to Sudoku.

You should have lots of fun with J!

Linda



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

Reply via email to