I have a question in Clojure about recur. If I have a let-statement inside the loop, can the recur call be applying to the let statement instead of the values of the loop? For example, in this scenario:
(defn someFunction [listA listB]
("do something here...."
[new-listA new-listB]))
(defn anotherFunction [listA listB]
("do something here...."
[new-listA new-listB]))
(defn myFunction [firstList secondList]
(loop [list1 (someMutation firstList)
list2 (someMutation secondList)]
(if (= "true" (someCondition))
(let [[newlist1 newlist2]
(someFunction list1 list2)]
(recur newlist1 newlist2))
(anotherFunction list1 list2) )))
is (recur newlist1 newlist2) applying to the loop or to the let? And is there a way of skipping this let statement and calling recur directly with the two values returned by "someFunction", assuming that I can't change the fact that "someFunction" returns a vector with two arguments?