Fork me on GitHub
Ian Fernandez10:04:54

Hi, I've asked some questions at a malli issue to understand some design motivations 🙂

Ian Fernandez10:04:18

Should be good if anyone here could contribute 🙂


Hi all! 👋 I'm looking into specifying higher-order functions, and wonder if there's a schema that resembles Clojure's ifn?. I notice there's no ifn? predicate in the predicate-schemas (nor does fn? make an appearance), so I'm leaning towards defining something in user space (assuming there's nothing in Malli that I've missed?). I'm hesitant to do something like [:alt keyword? [:=> :cat any?]] because I'm creating a closed schema that would need to be extended for any IFn that might crop up in future… thinking of a custom IntoSchema or similar maybe. Any tips are much appreciated!!


I can do this:

[:fn ifn?]


I'm just not sure if that's a bad way to go. 🙂


that's the way to do it now.