title: Is it possible to apply two functions to a list in Clojure?
body: <p>I wanted to call a function I wrote as well as add the elements to a hash-map. I wanted to know how I could apply both of these functions to the same list.</p>
  
  <p>For example, I have the following code for DFS Recursive code</p>
  
  <pre class="lang-clj prettyprint-override"><code>(defn dfs-recur [maze curr-loc goal-loc parent]
    (;;Want to add elements of the following list to the parent map 
     ;; and call dfs-recur on them
      (def unvisited (filter #(not (contains? parent %)) (get-neighbors maze curr-loc)))
      maze)
  </code></pre>
  
  <p>If I was to implement it in python it would look something like this. The issue is, I don't understand how to do all 4 things inside the for loop at once in Clojure</p>
  
  <pre class="lang-py prettyprint-override"><code>def dfs-recur(maze, curr-loc, goal-loc, parent):
      neighbors = get-neighbors(maze, curr-loc)
      for i in neighbors:
          if i in parent:
              break;
          parent[i] = curr-loc
          if i == goal-loc:
              break;
          parent = dfs-recur(maze, i, goal-loc, parent)
      return parent
  
  </code></pre>