funcool / lentes

Functional references for Clojure and ClojureScript
https://cljdoc.org/d/funcool/lentes/CURRENT
BSD 2-Clause "Simplified" License
94 stars 10 forks source link

Atomic swap and IAtom2 implementation #17

Closed jellelicht closed 2 years ago

jellelicht commented 3 years ago

Thank you for sharing this useful library! Although it might be very rare, derefing after the swap! could lead to a different value than what we produced in the call to swap!.

I also took the liberty to implement the clojure.lang.IAtom2 interface, as lentes already depends on a recent-enough clojure that supports working with this interface.

Please let me know where and how to add some improvements, tests and/or documentation to get this merged

niwinz commented 3 years ago

Looks very nice, I will review it tomorrow and merge ;)

jellelicht commented 2 years ago

Polite Ping. Anything I can do to polish this up enough for inclusion? I have a longer train ride coming up, so would be a nice distraction to work on. 😄

niwinz commented 2 years ago

No, everything is ok, It only I was very busy this days, mixed with a week that I was sick :( Thanks for the ping

niwinz commented 2 years ago

1.4.0-SNAPSHOT updated.

niwinz commented 2 years ago

In any case, you can use the library as git dependency and not wait the clojars release.