Re: Closure for object pattern? A good idea?

2016-12-10 Thread Logan Buckley
I feel like you would be better off separating functions from the data they operate on here. In this case, you could represent the state of a stopwatch with a map containing the start time and the time elapsed, and have functions `stop`, `reset`, `start`, etc that take the stopwatch data

Re: Clojure 1.9.0-alpha10: Semantic mismatch: any? vs not-any?

2016-07-18 Thread Logan Buckley
FWIW, I was not aware of `any?` when I read this thread, and I found its semantics confusing -- I think `anything?` would be much clearer. `anything?` also seems more obviously useful for defining specs (e.g. a function can take _anything_ as an argument). It seems usual in Clojure for scalar