Hi.
I hope this is the right place for Spec questions.
I try to composite different specs with and/or (I tried Google, but
searching for and/or is useless :/):
(s/def ::testa #{"a"})
(s/def ::testb #{"b"})
;;;(sdef+ ::testaa {:a ::testa})
(do
(clojure.spec.alpha/def
:data$testaa/a
:data/te
Thanks a lot. Your solution is very appreciated.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your
first post.
To
Hi.
This is a job for (group-by last ...)
Regards
Varun J.P schrieb am Di., 3. Juli 2018, 19:05:
> My CSV file is something like the attached file which could have 'n'
> number of line. I need to group by the values in the last column.
> Current I believe the below code will return me a vector
is a
> vector of vector but is throwing an error
>
>> "ClassCastException java.lang.String cannot be cast to clojure.lang.IFn
>> clojure.core/group-by/fn--7011
>> (core.clj:6870)"
>
>
> Can someone suggest a different approch
>
>
>
>
Macros aren't the right tool for that.
If you want to create a function that behaves differently, depending on the
input (Vector, seq or something else, like LinkedHashSet)
you should look into multimethods.
And if you want to do comprehensive data manipulation you should look
into https://gith
I never understood how Python is so popular, where spacing is most
important.
Other than that, I really prefer parinfer over paredit, because I don't
have to memorize all the key shortcuts to slurp, barf, split and slice.
Using tab and shift tab to control parens is really intuitive, because I