Welcome! Please see the About page for a little more info on how this works.

0 votes
in Clojure by
edited by

Not really sure what I'm doing wrong here.
I'm trying to cycle functions, but the result is a list of nils. When I modify the cycled functions to be a static function, it works as expected.
Any advice?

code: https://pastebin.com/K9xS9RG9

1 Answer

+3 votes

Use [pls1 pls2] or (list pls1 pls2) instead of '(pls1 pls2): ' is a quoting special form, which will not evaluate it's contents so you will have pls1 as a non-resolved symbol, not function:
(map class '(pls1 pls2)) => (clojure.lang.Symbol clojure.lang.Symbol)