-
I am trying to validate the input of a function, where the input is a vector of strings:
whoever:
How do you check for a list of strings? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Try |
Beta Was this translation helpful? Give feedback.
-
... ;; int and 1+ strings
[:cat :int [:+ :string]]
;; int and sequence of 1+ strings
[:cat :int [:schema [:+ :string]]] |
Beta Was this translation helpful? Give feedback.
...
[:+ :string]
is a "sequence of strings", but nested sequence schemas are inlined. You can escape the inlining also with using a non-sequence schema,:schema
being the simplest way to do that: