-
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.
Answered by
ikitommi
Dec 31, 2022
Replies: 2 comments
-
Try |
Beta Was this translation helpful? Give feedback.
0 replies
-
... ;; int and 1+ strings
[:cat :int [:+ :string]]
;; int and sequence of 1+ strings
[:cat :int [:schema [:+ :string]]] |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Tillaert
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
...
[:+ :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: