I hereby claim:
- I am tylerholien on github.
- I am tylerholien (https://keybase.io/tylerholien) on keybase.
- I have a public key ASBDDLlIR9zNrhdkMJYDKv1ZoYcgrMGi3-hK7193M9RWLwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
pairToList :: (a,a) -> [a] | |
pairToList = (flip map) [fst,snd] . flip ($) |
->z{h=Hash.new 0;z.map{|x,y|([x-1,x,x+1].product([y-1,y,y+1])-[[x,y]]).map{|p|h[p]+=1}};h.select{|a,b|b==3||b==2&&z.index(a)}.keys} |