Fork me on GitHub
#malli
<
2021-04-12
>
Ian Fernandez10:04:54

Hi, I've asked some questions at a malli issue to understand some design motivations 🙂 https://github.com/metosin/malli/issues/349

Ian Fernandez10:04:18

Should be good if anyone here could contribute 🙂

jcf19:04:34

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!!

jcf20:04:14

I can do this:

[:fn ifn?]

jcf20:04:24

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

ikitommi04:04:18

that's the way to do it now.