Fork me on GitHub
#malli
<
2022-04-18
>
mauricio.szabo17:04:31

Hi, I was playing with instrumentation on Malli, but I can't find a way to define a function that accepts two args: one int? and other a tuple of int? and string?. Essentially, I want to allow a function to accept (some-function 10 [20 "string"]) as arguments. How do I do this?

ikitommi18:04:34

maybe:

(m/validate [:cat int? [:tuple int? string?]] [10 [20 "string"]])
; => true

mauricio.szabo14:04:08

Yeah, that worked, thanks! I was trying with repeated :cat but that got me some weird messages......