Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am tolysz on github.
  • I am tolysz (https://keybase.io/tolysz) on keybase.
  • I have a public key ASDtaF2SMz4iT9byQvMcV47wcyCnSzsDdE4dIXC925x7qwo

To claim this, I am signing this object:

{-# LANGUAGE QuasiQuotes #-}
module Main where
import Text.Regex.PCRE.Heavy (gsub, re, Regex)
ignore_comments :: [Regex] -> [String]
ignore_comments rs =
map (\r -> gsub r ("":: String) ("/*test commentary*/ abc test")) rs
main :: IO ()
@tolysz
tolysz / Synacor.hs
Created January 13, 2014 14:30
Some solution, still debug or (de)compile are missing.
{-# LANGUAGE LambdaCase #-}
module Main where
import qualified Data.IntMap.Strict as M
import Data.Word
import Data.Char
import Control.Applicative
import Control.Monad
import Control.Monad.Trans.State.Lazy
@tolysz
tolysz / Hotel.hs
Created December 21, 2012 01:34
A simple stream hotel room allocator...
module Hotel where
import Data.List
data Allocs = Allocs {checkouts :: [RoomNo], checkins :: [RoomNo], currentMax :: Int}
deriving (Eq)
instance Show Allocs where
show (Allocs xo xi cm) = "A" ++ (show xo) ++ " " ++ (show xi)++" " ++ (show cm) ++ " "