2007/3/7, Sherlock, Ric <[EMAIL PROTECTED]>:
Hmmm...
I tried opening a new J session & copying your code in & running it line
by line with the following output:
f=: 0=3&|
b=: 0=5&|
pr=: [: ; (('';'fizz') {~ f) , ('';'buzz') {~ b fb=:":[EMAIL
PROTECTED](f+.b)"0
It's two lines erroneously concatenated into one.
Try splitting it into two:
pr=:[: ; (('';'fizz') {~ f) , ('';'buzz') {~ b
fb=:":[EMAIL PROTECTED](f+.b)"0
|domain error: f
| pr=:[:; (('';'fizz'){~f),('';'buzz'){~b fb=:":[EMAIL PROTECTED](f+.b)"0
I'm not sure what I'm doing wrong??
t in my solution can of course be simplified from
t=: (>./"1 f,.(2*b),.(3*f*.b))
to
t=: >./ 1 2 3 * f,b,:f*.b
(I always tend to think in columns which is not as concise as rows in J)
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of June Kim
> > I tried to run yours to see if the output was OK but got a domain
> > error when I ran pr=:...
>
> I don't have any error. Try it again in a clean session. (for
> instance, do clear 'base' first)
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm