collection-check icon indicating copy to clipboard operation
collection-check copied to clipboard

Add `:call? false` option for types that do not implement ifn

Open brandonbloom opened this issue 8 years ago • 0 comments

I have no idea if you'd actually want this PR, but I figured I'd share it with you in case anybody else ever does.

In summary, I wanted to test a type that was like 90% Clojure's collections, but doesn't implement IFn. An example of something like this in Clojure is tagged-literal, which offers lookup via :tag and :form, but does not implement IFn. For me, I wanted to be able to have an object that behaved like a function, but with some map-like metadata. It's sorta a goofy use case, hence you may not want this.

brandonbloom avatar Jan 21 '17 01:01 brandonbloom