r/Clojure • u/dustingetz • Mar 23 '26
On Functional Programming, Time, and Concurrency — Dustin Getz
https://gist.github.com/dustingetz/94c48ff7e9d2af93bae74d9b244fb79e
40
Upvotes
r/Clojure • u/dustingetz • Mar 23 '26
View all comments
Show parent comment
1
u/dustingetz Mar 25 '26
For printn-shaped discrete effects, elide the dispose method, you get an audit log, same as in React. Imagine the callback firing on rising or falling edges of the signal. For once-and-only-once transaction-shaped discrete effects, we have a transistor-like primitive "e/Token" that models the transact-and-await-confirmation workflow as a little state machine, i.e. it exposes the ready-pending-rejected-ok states: https://electric.hyperfiddle.net/fiddle/electric-tutorial.button-token$ButtonToken