NB. a set-reset state object state =: 0 NB. Initially the state is zero not_state =: 1 require_circuits_ 'circuits.ijs' bitNor =: bitNot_circuits_ & bitOr_circuits_ set_reset =: monad define 'r s' =. y. (state =: bitNor r , not_state) , not_state =: bitNor state , s state , not_state =: bitNot_circuits_ state )