ooppppssss again

left a 0 in there copying

   f=. 13 :  '((i. 0);,.x),.(y);x +/ y'
   f
((i.0) ; [: ,. [) ,. ] ; +/
   a f b
┌─┬───────┐
│ │0 1 2 3│
├─┼───────┤
│2│2 3 4 5│
│3│3 4 5 6│
│5│5 6 7 8│
└─┴───────┘


2011/11/20 Björn Helgason <[email protected]>

>
> Here it works to create tacit with 13 by using three lines
>
>    f=. 13 : 0
>  ('';,.x),.(y);x +/ y
> )
>    f
> ('' ; [: ,. [) ,. ] ; +/
>    a f b
> ┌─┬───────┐
> │ │0 1 2 3│
> ├─┼───────┤
> │2│2 3 4 5│
> │3│3 4 5 6│
> │5│5 6 7 8│
> └─┴───────┘
>
> I I now to to create it on one line it does not work this
>
>    f=, 13 : 0 '((i. 0);,.x),.(y);x +/ y'
> )
> |domain error
> |   f=,    13 :0'((i. 0);,.x),.(y);x +/ y'
>
> If I do it like this the same thing
>
>    f
> ('' ; [: ,. [) ,. ] ; +/
>    f=.((i. 0) ; [: ,. [) ,. ] ; +/
>
> It now works
>
>    f
> ((i.0) ; [: ,. [) ,. ] ; +/
>    a f b
> ┌─┬───────┐
> │ │0 1 2 3│
> ├─┼───────┤
> │2│2 3 4 5│
> │3│3 4 5 6│
> │5│5 6 7 8│
> └─┴───────┘
>
>


-- 
Björn Helgason, Verkfræðingur
Fornustekkum II
781 Hornafirði,
t-póst: [email protected]
gsm: +3546985532
twitter: @flugfiskur
http://groups.google.com/group/J-Programming


Tæknikunnátta höndlar hið flókna, sköpunargáfa er meistari einfaldleikans

góður kennari getur stigið á tær án þess að glansinn fari af skónum
          /|_      .-----------------------------------.
         ,'  .\  /  | Með léttri lund verður        |
     ,--'    _,'   | Dagurinn í dag                     |
    /       /       | Enn betri en gærdagurinn  |
   (   -.  |        `-----------------------------------'
   |     ) |         (\_ _/)
  (`-.  '--.)       (='.'=)   ♖♘♗♕♔♙
   `. )----'        (")_(") ☃☠
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to