This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-------------------------------------------------------------------------------- | |
-- | |
-- Partial implementation of the Python class model for Lua | |
-- | |
-- Copyright (c) 2012, Jonathan Zrake | |
-- | |
-------------------------------------------------------------------------------- | |
-- | |
-- Exports the following functions: | |
-- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE BangPatterns #-} | |
module Main (fib1, fib2, fib3, fib4, main) where | |
import Control.Monad | |
import Control.Monad.ST | |
import Data.STRef | |
import Criterion.Main | |
fib1 :: Int -> Integer | |
fib1 n = fst $ fib' n | |
where fib' 0 = (1, 1) |