Re: Stackoverflow
Daniel Green <octoberdan <at> gmail.com>
2008-01-01 21:18:29 GMT
By the way, really cool code.
On Jan 1, 2008 3:46 PM, Daniel Green <octoberdan <at> gmail.com> wrote:
> daniel <at> octobertop:~$ java -version
> java version "1.6.0_03"
> Java(TM) SE Runtime Environment (build 1.6.0_03-b05)
> Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_03-b05, mixed mode)
>
> Although I'm not sure if Scala is using it or not....
>
>
> On Jan 1, 2008 3:34 PM, Oscar Picasso <oscarpicasso <at> gmail.com> wrote:
> > I found the problem. I used java 1.6.
> >
> > It works fine with java 1.5.
> >
> > Is scala supposed to support java 1.6?
> >
> >
> >
> > On Jan 1, 2008 2:55 PM, Daniel Green < octoberdan <at> gmail.com> wrote:
> > > Works for me:
> > >
> > > daniel <at> octobertop:~$ uname -a
> > > Linux octobertop 2.6.20-16-generic #2 SMP Sun Sep 23 18:31:23 UTC 2007
> > > x86_64 GNU/Linux
> > > daniel <at> octobertop:~$ scala
> > > Welcome to Scala version 2.6.0-final.
> > > ....
> > > scala> (for(x <- 100 to 999; y <- x to 999) yield x * y).filter((a) =>
> > >
> > > a.toString.reverse.mkString == a.toString)
> > > res0: Seq.Projection[Int] = RangeGF(10201, 11211, 12221, 13231, 14241,
> > > 15251, 16261, 17271, 18281, 19291, 20402, 21412, 22422, 23432, 24442,
> > > 25452, 26462, 27472, 28482, 29492, 30603, 31613, 32623, 33633, 34643,
> > > 35653, 36663, 37673, 38683, 39693, 40804, 41814, 42824, 43834, 44844,
> > > 45854, 46864, 47874, 48884, 49894, 20502, 21012, 41514, 42024, 62526,
> > > 63036, 83538, 84048, 21012, 26162, 4...
> > >
> > >
> > >
> > >
> > > On Jan 1, 2008 2:49 PM, Oscar Picasso <oscarpicasso <at> gmail.com> wrote:
> > > > Hi,
> > > >
> > > > The following works fine:
> > > > (for(x <- 100 to 999; y <- x to 999) yield x * y).filter(_ % 2 == 0)
> > > >
> > > > But this throws a StackOverflowError:
> > > > (for(x <- 100 to 999; y <- x to 999) yield x * y).filter((a) =>
> > > > a.toString.reverse.mkString == a.toString)
> > > >
> > > > Why?
> > > >
> > >
> >
> >
>