4 ms·
Clojure transducers are exactly signal functions from Haskell FRP literature, for those interested in such a connection.
by davdar 12y ago
Clojure transducers are exactly signal functions from Haskell FRP literature, for those interested in such a connection.
- richhickey 12y agoI'm not yet seeing that, given: Signal a :: Time -> a SF a b :: Signal a -> Signal b thus (Time -> a) -> (Time -> b) not exactly: (x->a->x) -> (x->b->x) Can you point me to a paper that makes the connection clear?
- davdar 12y agoIn the non-continuous FRP literature[1], i.e. the kind you actually implement, SF a b = [a] -> [b], which is isomorphic to: Fold a -> Fold b, where Fold a = (exists s. (s, s -> (a, s))), which isomorphic to the type the author writes for transducer: ;;transducer signature (whatever, input -> whatever) -> (whatever, input -> whatever) Signal functions are easy to program in Haskell using arrow syntax, and many libraries already exist for dealing with signal functions. [1]: Nilsson, Courtney and Peterson. Functional Reactive Programming, Continued. Haskell '02. http://haskell.cs.yale.edu/wp-content/uploads/2011/02/workshop-02.pdf http://haskell.cs.yale.edu/wp-content/uploads/2011/02/worksh... (see section 4) edit: formatting
- deleted 12y ago[deleted]