| 1 |
module Model where |
| 2 |
|
| 3 |
import Probability |
| 4 |
|
| 5 |
model = do |
| 6 |
x <- sample $ normal 0 1 |
| 7 |
ys <- lazy $ sample $ independent $ repeat $ normal 0 1 |
| 8 |
return $ (x * x) : (take 10 ys) |
| 9 |
|
| 10 |
main = do |
| 11 |
y <- runRandomStrict $ sample $ normal 0 1 |
| 12 |
putStrLn $ show y |