On Tue, Jun 09, 2009 at 02:59:02PM -0700, Alex Cruise wrote:
> Yes, that would be interesting indeed. :)
>
> def f(n: ⇒ Int) = for (x ← 1 to n) yield Map(x → ("*" * x))
Stranger yet would be if the language included some out of the box:
scala> for (x \u2190 1 to 10) yield x
res0: scala.collection.generic.VectorView[Int,Vector[_]] = RangeM(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
scala> (x: Int) \u21D2 x + 1
res1: (Int) => Int = <function>
--
Paul Phillips | All men are frauds. The only difference between
Apatheist | them is that some admit it. I myself deny it.
Empiricist | -- H. L. Mencken
i pull his palp! |----------*
http://www.improving.org/paulp/ *----------