Skip to content

Instantly share code, notes, and snippets.

case $TERM in
*xterm*|*rxvt*|(dt|k|E|a)term)
preexec () {
print -Pn "\e]2;$1\a" # edited; %n@%m omitted, as I know who and where I am
}
;;
esac
@windelicato
windelicato / 15.hs
Created April 5, 2013 02:48
Project Euler #15
factorial :: Integer -> Integer
factorial n = foldr (*) 1 [1..n]
choose :: Integer -> Integer -> Integer
choose n k = (factorial n) `div` ((factorial k) * (factorial (n - k)))
main :: IO ()
main = print $ choose 40 20