Open kjh618 opened 2 weeks ago
(From the discussions on the Oct. 14 class) Instead of the fsm combinator itself being a compiler magic, would it be better to make it a thin wrapper around a magic Fsm, and comb? Then, fsm would be implemented like the following:
fsm
Fsm
comb
fn fsm(self, init, f) { let m_fsm = Fsm(init, f); self.comb(m_fsm) }
Good idea! I believe it is more ergonomic way to implement the fsm combinator.
Since it requires some compiler changes, we will do it later. Thank you for suggestion!
(From the discussions on the Oct. 14 class) Instead of the
fsm
combinator itself being a compiler magic, would it be better to make it a thin wrapper around a magicFsm
, andcomb
? Then,fsm
would be implemented like the following: