Advertisement
Guest User

Untitled

a guest
Oct 14th, 2019
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. /*
  2. build.sbt:
  3.  
  4. libraryDependencies +=
  5. "org.scala-lang.modules" %% "scala-parallel-collections" % "0.2.0"
  6. */
  7.  
  8. import scala.collection.parallel.CollectionConverters._
  9.  
  10. def fact(n: Int): BigInt = (n to 1 by -1).par.product
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement