This file contains 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 TypeOperators #-} | |
module StreamProc where | |
import Prelude hiding ((.), id, const) | |
import Control.Category | |
import Control.Arrow | |
import Control.Applicative | |
const :: (Arrow (~>)) => a -> (b ~> a) | |
const x = arr (\_ -> x) |
This file contains 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
import Data.List | |
import System.Environment | |
{- RE: http://stackoverflow.com/q/6964392/157360 | |
cam@atomos:~/scraps/SO/euler$ ghc -O2 --make Euler12.hs | |
cam@atomos:~/scraps/SO/euler$ time ./Euler12 1000 | |
842161320 | |
real 0m12.892s |
This file contains 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 TypeFamilies #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE UndecidableInstances #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
module RotateArgs where | |
data Z = Z | |
data S n = S n | |
class RotateArgs n a where |
This file contains 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
import Prelude hiding ((++), concat) | |
import Control.Applicative | |
import Control.Monad | |
import Data.Maybe | |
import Data.Monoid | |
import System.Random | |
import qualified Data.IntMap as IM | |
import Graphics.DrawingCombinators | |
import qualified Graphics.UI.SDL as SDL | |
import Graphics.UI.SDL.Keysym |
NewerOlder