{"id":5306,"date":"2014-03-30T20:35:26","date_gmt":"2014-03-30T20:35:26","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/dynamic-let-list-destructuring-in-clojure-collection-of-common-programming-errors\/"},"modified":"2014-03-30T20:35:26","modified_gmt":"2014-03-30T20:35:26","slug":"dynamic-let-list-destructuring-in-clojure-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/dynamic-let-list-destructuring-in-clojure-collection-of-common-programming-errors\/","title":{"rendered":"Dynamic let List Destructuring in Clojure-Collection of common programming errors"},"content":{"rendered":"<p>I have a <code>let<\/code> statement in which I would like to dynamically destructure a list. The following is my solution:<\/p>\n<pre><code>symList  ;; list of some Strings which will become the vector of Symbols to assign to\nvalList  ;; list of some values, same length as symList\n\n(let [(map read-string symList) valList]\n  ...)\n<\/code><\/pre>\n<p>An example value of <code>symList<\/code> would be <code>(\"pt1\" \"pt2\")<\/code> and an example value of <code>valList<\/code> would be <code>(1 2)<\/code><\/p>\n<p>However, this produces an exception that the first part is an &#8220;unsupported binding form&#8221;. I suspect I am missing something regarding syntax-quoting, or that it&#8217;s not possible. Any advice would be greatly appreciated.<\/p>\n<p><b>EDIT:<\/b> I will only know these values come run time, hence this approach. Secondly, I need to be able to pass the lexical scope later on, hence the use of <code>let<\/code>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have a let statement in which I would like to dynamically destructure a list. The following is my solution: symList ;; list of some Strings which will become the vector of Symbols to assign to valList ;; list of some values, same length as symList (let [(map read-string symList) valList] &#8230;) An example value [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-5306","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5306","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=5306"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5306\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=5306"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=5306"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=5306"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}