- Juni 2014
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
import System.IO | |
import Data.Ratio | |
import Control.Monad (liftM2) | |
import XMonad | |
-- import XMonad.Config.Gnome | |
import Data.Monoid | |
import System.Exit |
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
" .vimrc | |
" OrigAuthor: Steve Losh <[email protected]> | |
" OrigSource: http://bitbucket.org/sjl/dotfiles/src/tip/vim/ | |
" Author: Martin Heuschober <[email protected]> | |
" Source: http://http://github.com/epsilonhalbe/dotfiles/vimrc | |
" | |
" This file changes a lot. I'll try to document pieces of it whenever I have | |
" a few minutes to kill. | |
" Preamble ---------------------------------------------------------------- {{{ |
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
module MyCombinatorics where | |
import Data.List ( (\\), | |
sort) | |
import Control.Applicative ( liftA2, | |
Applicative, | |
pure) | |
(^*) :: (a -> b) -> (b -> c) -> a -> c | |
f ^* g = g . f |
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
module MyCombinatorics where | |
import Data.List ( (\\), | |
sort) | |
import Control.Applicative ( liftA2, | |
Applicative, | |
pure) | |
(^*) :: (a -> b) -> (b -> c) -> a -> c | |
f ^* g = g . f |
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
module Transformer (dec2bin, bin2dec, dec2hex, hex2dec, num2letters, letters2num) where | |
dec2bin :: Int -> [Int] | |
dec2bin n | |
|n==0 = [] | |
|otherwise = (dec2bin (div n 2))++[mod n 2] | |
bin2dec :: [Int] -> Int | |
bin2dec bs = foldl1 (\x y ->x*2+y) bs |
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
{- my (=ε/2) haskellous version of the game called mastermind -} | |
import Data.List.Split (splitOneOf) | |
{- has to be fetched with | |
foo@bar~> cabal update | |
foo@bar~> cabal install split | |
-} | |
import Random | |
main = do |
NewerOlder