Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- build.sbt:
- libraryDependencies +=
- "org.scala-lang.modules" %% "scala-parallel-collections" % "0.2.0"
- */
- import scala.collection.parallel.CollectionConverters._
- def fact(n: Int): BigInt = (n to 1 by -1).par.product
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement