p
example
package example
Ordering
- Alphabetic
Visibility
- Public
- All
Value Members
-
object
Fib
Recursive algorithm of the n-th Fibonacci number
Recursive algorithm of the n-th Fibonacci number
Demonstrates how to recursively spawn new tasks from a task
Defines two tasks:
reduce
calculates (n-1)+(n-2)fibtask
spawns the necessary tasks
- object PiApp extends App
-
object
PiTasks
Definitions of subtasks for calculating Pi
Definitions of subtasks for calculating Pi
We define two tasks:
batchCalc
throws points to a square and count those within the unit circlepiCalc
calculates Pi based on the number of points inside/outside
Both of these need case classes to hold inputs and results.