Clojure Passing Individual Variables to Function
<p>I am trying to pass some vectors containing a list of nodes in to a function in clojure the function works if i was to type the variables in but i am not sure how to pass a single variable from each vector in at a time.</p>

<pre><code>(def ItemPickUp [:a1 :Mail])
(def ItemDestinations [:Storage :a1])
(def Robot {[ItemPickUp] [ItemDestinations]})



(defn shortestPath [g start dest]
(let [not-destination? (fn [[vertex _]] (not= vertex dest))]
(-&gt; (shortest-paths g start)
    (-&gt;&gt; (drop-while not-destination?))
    first
    (nth 2))))

(apply shortestPath G (apply first Robot)((apply second Robot)))
</code></pre>

<p>I need to pass a variable from the ItemPickUp and ItemDestination into shortestPath using robot but instead of passing one of the variable in it passes both :a1 and :Mail and vice versa for the other one.</p>

<p>How do i go about passing each variable in individually so the first two variables for the first iteration is :a1 and :Storage and so on?</p>

<p>Thanks.</p>