disastrs :: present! :: notes

The sky above the port was the color of a television, tuned to a dead channel.
?(?-) (A TV static simulator.)
?(?-) (Applicative order rule definitions)
<> ((?x) (?y) <=!=>) (<> ?x ?y)
<> ((?x) ?. <=!=>) (<> ?x (?.))
<> (?x ?y <=!=>) (<> ?x ?y)
<> (<!> ?x ?y) ((?x) (?y) ?(?x ?x) <=!=>)
?(?-) (Applicative-order lambdas)
<> ((?l ?r) ?. <=!@=>) (?(?l ?r) ?.)
<> (<!@> (?l ?r) ?x) ((?l ?r) ?x ?(?z ?z) <=!@=>)
?(?-) (Function application)
<> (?. <=$=> ?f) (?f ?.)
<> ((?a) <=$=> ?f) (?f ?a)
<> (<$> ?f ?a) (?a ?(?x ?x) <=$=> ?f)
$screen-size -> ((number 48))
$live-color -> ((color #ffffff))
$dead-color -> ((color #000000))
<> (?x -> ?y) (<> ?x ?y)
?(?-) (Point type:
 (point 
  (number :x)
  (number :y))
)
?(?-) (Utils)
<> (!random) (?((?: ?0 ?1) ?:) rand 0 2)
<> (eq (?x ?x)) #t
<> (eq (?x ?y)) #f
<> ((number ?0) (number ?1) `?:) ((number ?:))
<> (-1 (number ?x)) ((number ?x) (number 1) `-)
<> (+1 (number ?x)) ((number ?x) (number 1) `+)
<> (read ?: (point (number ?0) (number ?1)) (color ?2)) ?:
<> (draw ?: (point (number ?0) (number ?1)) (color ?2)) ?:
?(?-) (Initialize the game board)
<!> (?p (number 0) cell) (draw pixel ?p $dead-color)
<!> (?p (number 1) cell) (draw pixel ?p $live-color)
<> (random-painter ?p) (?p (number 0) (number 2) `rand cell)
<> (handle-event (Tic ?x)) ($screen-size $screen-size init)
<> (handle-event ?x) (?(?: ?:) (print (Unknown event: ?x \n)))
<> (on-event ?~) (handle-event ?~ on-event Any)
<> ((number 0)  (number 0) init) ()
<> ((number 0)  (number ?j) init) ($screen-size (number ?j) (number 1) `- init)
<> ((number ?i) (number ?j) init) (
  (point (number ?i) (number ?j)) (number 0) (number 2) `rand cell
  (number ?i) (number 1) `- (number ?j) init
)
<!@> (((number ?0) (number ?1) ?:) ?:) ($screen-size $screen-size size)
on-event Any