malli

https://github.com/metosin/malli :malli:
2021-04-12T10:16:54.375200Z

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

2021-04-12T10:17:18.375800Z

Should be good if anyone here could contribute πŸ™‚

jcf 2021-04-12T19:50:34.389400Z

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

jcf 2021-04-13T10:23:22.398700Z

Thanks, @ikitommi!

jcf 2021-04-12T20:08:14.389500Z

I can do this:

[:fn ifn?]

jcf 2021-04-12T20:08:24.389700Z

I'm just not sure if that's a bad way to go. πŸ™‚