Finite State Transducers in Haskell?
问题 I've been wondering if there is a way to define and work with finite state transducers in Haskell in an idiomatic way. You can approach FSTs as generators (it generates an output of type {x1,x2}), or as recognizers (given an input of type {x1,x2} it recognizes it if it belongs to the rational relation), or as translators (given an input tape, it translates it into an output tape). Would the representation change depending on the approach? Would it also be possible to model a FST in a way that