NB. a d-latch state object state =: 0 NB. Initially the state is zero not_state =: 1 require_circuits_ 'circuits.ijs' bitNor =: bitNot_circuits_ & bitOr_circuits_ bitAnd =: bitAnd_circuits_ bitNot =: bitNot_circuits_ d_latch =: monad define 'c d' =. y. 'state not_state' =: (bitNor (bitAnd c, bitNot d) , not_state) , bitNor state , bitAnd c , d 'state not_state' =: (bitNor (bitAnd c, bitNot d) , not_state) , bitNor state , bitAnd c , d )