Fixed by doing this:

 (defn map-mtr
        [read-map premid reading]
        (conj read-map {premid reading}))

On Jun 30, 11:11 am, octopusgrabbus <[email protected]> wrote:
> I have a sequence
>
> (def mtr-seq ["a" 1 "b" 2 "c" 3 "d" 4])
>
> and a function
>
> (defn map-mtr
>         [read-map premid reading]
>         (conj :read-map {:premid reading}))
>
> I do not understand how to select the first and second of the sequence
> to be put into mtr-seq.
>
> This  (map-mtr [mtr-map][(first mtr-seq)][(first (rest mtr-seq))])
> fails with java.lang.ClassCastException: clojure.lang.Keyword cannot
> be cast to clojure.lang.IPersistentCollection
>
> In REPL I can select the first and second element with no problem.
> What am I doing wrong?
>
> Thanks.
> cmn

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to