Skip to content

Instantly share code, notes, and snippets.

@nushio3
Created August 4, 2013 08:27
Show Gist options
  • Save nushio3/6149688 to your computer and use it in GitHub Desktop.
Save nushio3/6149688 to your computer and use it in GitHub Desktop.
import Control.Parallel.Strategies
fib :: Integer -> Integer
fib 0 = 0
fib 1 = 1
fib n = fib (n-1) + fib (n-2)
main = print . snd . runEval $ do
x <- rpar $ (undefined :: Integer) -- (fib 100)
y <- rpar (fib 100)
return (x,y)
@nushio3
Copy link
Author

nushio3 commented Aug 4, 2013

あわせてご覧ください: 元ネタ http://ideone.com/ajhkl3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment