Skip to content

Instantly share code, notes, and snippets.

import Data.Tree
type State = Int
data ST a = S (State -> (a, State))
apply :: ST a -> State -> (a,State)
apply (S f) x = f x
instance Monad ST where
module Main where
import Control.Parallel
import Control.Parallel.Strategies (rseq, rpar, Strategy, using, runEval)
import Data.Time.Clock
import Text.Printf
import System.Environment
-- <<fib