Skip to content

Instantly share code, notes, and snippets.

play stupid games / win stupid prizes

Patrick Thomson patrickt

play stupid games / win stupid prizes
View GitHub Profile
View router.hs
{-# LANGUAGE GeneralizedNewtypeDeriving, OverloadedStrings, ViewPatterns #-}
module Main where
import Control.Applicative
import Data.ByteString (ByteString)
import qualified Data.ByteString as B
import Data.Char
import Data.Monoid
import Data.Scotty
View gist:562323
(x:xs) `minus` yys@(y:ys)
| x == y = xs `minus` ys
| otherwise = x : xs `minus` yys
naturals = [1..]
evens = [2,4..]
odds = naturals `minus` evens
You can’t perform that action at this time.