-step :: !{#String} -> {#String}
-step ls = {{step` x y\\x<-[0..size ls.[0] - 1]}\\y<-[0..size ls - 1]}
+numOccupied :: {#String} -> Int
+numOccupied ls = length [()\\r<-:ls, c<-:r | c == '#']
+
+cell :: (Int Int Int Int {#String} -> Bool) (Int -> Bool) (Int -> Bool) {#String} -> {#String}
+cell lookfun live die ls
+ # ls` = {{step x y\\x<-[0..size ls.[0] - 1]}\\y<-[0..size ls - 1]}
+ = if (and [l==r\\l<-:ls` & r<-:ls]) ls (cell lookfun live die ls`)