Why is

   ([EMAIL PROTECTED])
|domain error
|   (    [EMAIL PROTECTED])

   9!:14 ''
j601/beta/2006-04-07/16:05

R.E. Boss


-----Oorspronkelijk bericht-----
Van: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Namens R.E. Boss
Verzonden: maandag 24 april 2006 17:23
Aan: 'Programming forum'
Onderwerp: RE: [Jprogramming] Puzzle: Stop and go sums

    (0:[EMAIL PROTECTED])/\.&.|. 0  1 1 1  0 0 0 0  1 1  0 0 0  1 1 1 1 1  0   1
0 1 2 3 0 0 0 0 1 2 0 0 0 1 2 3 4 5 0 1

R.E. Boss

-----Oorspronkelijk bericht-----
Van: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Namens Dan Bron
Verzonden: maandag 24 april 2006 16:31
Aan: Programming forum
Onderwerp: [Jprogramming] Puzzle: Stop and go sums

I need running sums that obey traffic lights.  

           sgs  0  1 1 1  0 0 0 0  1 1  0 0 0  1 1 1 1 1  0   1
        0 1 2 3 0 0 0 0 1 2 0 0 0 1 2 3 4 5 0 1

What's the most efficient way to express  sgs  ?  So far I've got:

           db0 =:  (~:&0@:[ * +)/\.&.|.
           db1 =:  ;@:(<@:(+/\);.1~ (< _1&(|.!._)))

-Dan
----------------------------------------------------------------------
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

Reply via email to