On 30/08/2014 15:07, Alexey Kachayev wrote:
> 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).
>
I'm going to have to reduce the resulting list next so I thought to use
a map version of the list comp. but ran into a similar error:
(defn calc .......
(let [ .....
.......
list-of-lists (map #(rest (first %)) results)]
(-> list-of-lists
(map #(let [plan (keyword (first %))
deg (Integer/parseInt (second %))
sign (signs (keyword (first (rest (rest %)))))
min (Integer/parseInt (second (rest (rest %))))
long (Float/parseFloat (last %))]
{plan {:sign sign :deg deg :min min :long long}})))
"Don't know how to create ISeq from: astro.calc$calc$fn__29869"
Now I'm using a let form but the error is similar.
gvim
> <mailto:
gvi...@gmail.com>>:
>
> I have a long function which produces `list-of-lists` :
>
> (("Sun" "21" "li" "13" "
201.2139410 <tel:
201.2139410>")
> <mailto:
clo...@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+unsubscribe@__
googlegroups.com
> <mailto:
clojure%2Bunsu...@googlegroups.com>
> For more options, visit this group at
>
http://groups.google.com/__group/clojure?hl=en
> send an email to clojure+unsubscribe@__
googlegroups.com
> <mailto:
clojure%2Bunsu...@googlegroups.com>.
> For more options, visit
https://groups.google.com/d/__optout
> <
https://groups.google.com/d/optout>.
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to
clo...@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+u...@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+u...@googlegroups.com
> <mailto:
clojure+u...@googlegroups.com>.