Skip to content

Instantly share code, notes, and snippets.


Kai Sassnowski ksassnowski

View GitHub Profile
ksassnowski / functor.php
Last active Jan 23, 2019
Playing around with functors in PHP
View functor.php
interface Functor
// fmap :: Functor f => (a -> b) -> f a -> f b
public function fmap(callable $fn): Functor;
class Fn implements Functor
ksassnowski / filterMfuckery.hs
Last active Nov 3, 2016
Trying to understand `filterM (const [True, False]) [1..5]`
View filterMfuckery.hs
-- Given a list of numbers, generate a list of all possible sums.
-- Solution
map sum $ filterM (const [True, False]) [1..5]
-- Manual evaluation of `filterM (const [True, False]) [1..5]` using repeated substitution
filterM (const [True, False]) [1..5]
-- replace `filterM` with its definition
View .vimrc
set nocompatible
filetype off
call plug#begin('~/.vim/plugged')
" Plugins
" ------------------------------
Plug 'kien/ctrlp.vim'
Plug 'Raimondi/delimitMate'
Plug 'mattn/emmet-vim'