Wed Aug 8 18:15:10 EDT 2018

applicative style and instantiating spaghetti networks

There is something to learn here.
1. Why is it hard to express this applicative?

It might not be really that hard, but it's hard to write it down all
at once.  It is likely that arguments need to be added to functions to
make this work.

So here is the insight: It's not that different from closing over any
other state such as registers.

A closing function creates a more abstract I/O relation from
subcircuits.  The trick is to understand what the desired I/O lines
are for the more abstract circuit.  Then write those down as

f i = do
  o <- ...
  return o

If all the other pieces are written in applicative style, they will
just fall into place.