Page 6 of 6,523 results found for scala =>
ff = f _ ff: (Int, Int) => Int = <function> scala> val fft = Function.tupled(ff) fft: ((Int, Int)) => Int = <function> In Scala 2.8: scala> def f (i :
http://stackoverflow.com/question...ing-a-function-to-a-tuple-in-scala
this than the nested for expressions? Tags: arrays scala scala-collections On Scala 2.7, use Array.range : for { x <- Array.range(1, 3) } yield for { y
http://stackoverflow.com/question...ate-two-dimensional-array-in-scala
foo is an AnyRef | } Tags: generics scala scala-2.8 type-inference This one works well for me (even in Scala 2.7): scala> l.foreach { foo: Foo[_] => |
http://stackoverflow.com/question...ilure-in-2-7-is-there-a-workaround
Calling Scala constructor with multiple argument lists Calling Scala constructor with multiple argument lists In Scala, I can create a method that
http://stackoverflow.com/question...uctor-with-multiple-argument-lists
scala functional-programming scalaz state-monad def index[M[_]:Traverse, A](m: M[A]) = m.traverse[({type ?[x] = State[Int,x]})#?, (A, Int)](a => state(i
http://stackoverflow.com/questions/4562850/basic-scalaz-state-question
import Keys._ import currentState._ import extracted._ Welcome to Scala version 2.8.1 . scala> import Keys.{settings => _, _} import Keys.{settings=>_, _}
http://stackoverflow.com/question...-resolve-import-conflicts-in-scala
Tags: scala types scala-2.8 scala-collections For anyone stumbling across this question wondering why the most-voted answer doesn't work for them, be
http://stackoverflow.com/question...8/scala-collection-type-for-filter
ev: ClassManifest[M[_]]) (new TypeCtor[Vector]).ev.erasure // => class scala.collection.immutable.Vector Tags: scala manifest higher-kinded-types
http://stackoverflow.com/question...ontext-bound-for-type-constructors
number? No, no tracker number. The first code snippet also throws error in Scala 2.7.7final: scala> trait Test[M[A] <: { def map[B](f: A => B) : M[B] } ] {}
http://stackoverflow.com/question...ecursive-structural-types-in-scala
Int = 2 c: Int = 3 scala> (2,3) match { | case (a,b) => 100 | case (b,c) => 200 | case _ => 999 | } <console>:8: error: unreachable code case (b,c) =>
http://stackoverflow.com/question...eference-a-val-in-a-case-statement