clojure - Trouble with this macro -
Shocking enough, I'm having trouble designing this macro correctly.
The macro is as I wrote:
(defmacro construct-vertices [xs ys] (opposition 'draw-line-strip (map # (list top% 1% 2) xs ys)))
It needs to be in two collections or seqs, xs
and ys
, and I need it ...
(draw-line-bar (top 0) (top 1 1) (top 3 3) (top 5 6) (top 7 8))
... of New xs
= [0 1 3 5 7]
and ys
= [1 1 3 6 8]
.
This works fine if I have my macro plain 'n' simple vectors (like [1 2 3 4]
and [2 3 4 5]
) but if I give it a lazy-seq / anything that is evaluated like (take 16 (repeating # (+ 0.1% 1)) does not work 0))
And (16 (cycle [0 -0.1 0 0.1]))))
.
I realize that this is because this macro is unchanged, and so I am getting it, for example, I am sure that I am missing some basic syntax - quotation / landing pattern - I will get some help / hints! Thank you very much. Edit should tell me, Edit 2 is for a custom graphing tool that I want, and the primary motivation to make it was to be faster than JFreeCharts and the company. Mentioned above. It uses the Unfortunately, I can find ... ... it uses some thousand items with long list While doing (s), the reason for this is I'm writing too much in the compiled code already, and class file (I think) can not control that data / code It seems that I, somehow, I'm still open, however, to solve this problem, a more elegant, less humorous, macro solution. If someone is present! (take the top) as my first result (I do believe). Unfortunately, I have tried to evaluate all of them first and then failed / failed to issue my macro-rearlit.
draw-line-strip
is a macro, and vertex
creates an OpenLL vertex is; They are part of both. eval
, as shown below, but in this way:
(defmacro construct-vertices [xs ys] (Opposition draws' Line-strip (map # (
Error: java.lang classformetair: Class file TL / Core $ The index of 3171 for this category is invalid in the continuous pool in draw__ $ FND 9 357 (Core.Q: 14)
draw-line-strip
need to get a function version, as suggested.
I saw the macro expansion for the draw-line strip and saw that it only binds the body in binding, GL-format, and gl-end, then you The code can be inserted into it.
then
(defn construct-vertices [xs ys] (draw-line-strip (toran (map # (top% 1% 2) xs ys)))
should work.
Comments
Post a Comment