This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-05-12
Channels
- # beginners (40)
- # boot (2)
- # cider (16)
- # clara (2)
- # cljs-experience (2)
- # clojure (100)
- # clojure-italy (11)
- # clojure-russia (2)
- # clojure-spec (9)
- # clojure-uk (34)
- # clojurescript (36)
- # community-development (3)
- # core-async (4)
- # cursive (4)
- # datascript (1)
- # datomic (20)
- # duct (10)
- # emacs (1)
- # fulcro (2)
- # off-topic (40)
- # onyx (12)
- # overtone (8)
- # portkey (6)
- # quil (1)
- # re-frame (7)
- # ring-swagger (2)
- # shadow-cljs (2)
- # spacemacs (2)
- # test200 (10)
- # tools-deps (16)
- # unrepl (1)
- # vim (24)
I have a spec:
(s/def ::statement (s/cat ::header ::header
::delimiter ::delimiter
::txs-header ::txs-header
::txs ::txs))
-- is it how it is supposed to look like, or am I missing some shorthand?::header
, ::delimiter
etc are declared using s/cat
themselves, so I suppose s/tuple
can't be used here.
Maybe there is a simpler way to spec this data format? The input is a CSV file parsed into a vector of vectors. Header is a number of lines, more-or-less fixed, but some are optional and may be omitted. Delimiter is a single fixed line. Txs headers is another set of more-or-less fixed lines, and txs is the rest of the document.
s/tuple might be better
For vector of fixed position fields