for macro expects each pair to be either binding-form/collection-expr or
one of known modifiers (:let, :when, :while).

Here:

plan (keyword (first l))

you give a pair of binding-form and keyword (which is really impossible to
iterate over).

If you meant let-binding for plan, dec, min and long, use :let modifier
(you can find example in documentation -
http://clojuredocs.org/clojure_core/clojure.core/for).


2014-08-30 16:47 GMT+03:00 gvim <gvi...@gmail.com>:

> I have a long function which produces `list-of-lists` :
>
> (("Sun" "21" "li" "13" "201.2139410")
>  ("Moon" "11" "le" "21" "131.3457459")
>  ......)
>
> .... before entering a list comprehension (simplified for brevity):
>
>  (defn calc .......
>     (let [ .....
>         .......
>         list-of-lists (map #(rest (first %)) results)]
>         (for [l list-of-lists
>              plan (keyword (first l))
>               deg (Integer/parseInt (second l))
>               sign (signs (keyword (first (rest (rest l)))))
>               min (Integer/parseInt (second (rest (rest l))))
>               long (Float/parseFloat (last l))]
>            {:deg deg :min min :long long})))
>
> When I call the function I get this error:
>
> IllegalArgumentException Don't know how to create ISeq from:
> clojure.lang.Keyword  clojure.lang.RT.seqFrom (RT.java:505)
>
> I've tested all the bindings in the repl and they produce the desired data
> so it seems the final construction of the map is where the problem lies.
>
> gvim
>
>
> --
> 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 unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> --- You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Kind regards,
Alexey S. Kachayev,
CTO at Attendify.com
----------
http://github.com/kachayev
http://twitter.com/kachayev
Skype: kachayev
Tel: +380-996692092

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to