title: lazy sequence evaluation timing issue
body: <p>I want to expand URLs from Twitter data and (simultaneously-ish) extract their domains. I tried doing this before in Python using requests, but I guess I screwed up somewhere, because the vast majority of the URLs are still in 'short' form (bit.ly, goo.gl, etc.) I've got the Twitter data stored as JSON. I'm using <code>clj-http.client :as client</code> to resolve the URLs. I've got code that looks like this, so far:</p>
  
  <pre><code>(defn expand-urls [urls] (for [url-str urls] 
                       (and url-str (last (:trace-redirects 
                                            (client/get url-str))))))
  
  (def ^:dynamic *domain-pat* (re-pattern #"https?://([\w\.]+)/.*"))
  
  (defn get-domains [urls] (for [url urls] (first (filter #(not= url %1) 
                             (re-find *domain-pat* url)))))
  </code></pre>
  
  <p>I've got the Twitter data formatted <code>[tweet-id [{tweet-data-map} {user-data-map}]]</code>, so <code>(get-in json-data [1 0 "urls"]</code> returns the URLs, <code>(get-in json-data [1 0 "domains"])</code> returns the domains.</p>
  
  <p>When I try something like <code>(update-in (update-in js-line [1 0 "urls"] expand-urls) [1 0 "domains"] get-domains)</code>, <code>domains</code> are <code>(nil)</code>. I've independently verified that my regex works, so I suspect that the issue is that the lazy sequence returned by <code>expand-urls</code> isn't evaluating by the time <code>get-domains</code> gets called. Frustratingly, <code>(type (doall (expand-urls some-urls)))</code> returns <code>clojure.lang.LazySeq</code>, as does <code>(type (doall (doall (expand-urls some-urls))))</code>. I've tried <code>doall</code>, I've tried adding <code>vec</code> into <code>expand-urls</code>. Neither seem to work.</p>
  
  <p>Is this really a laziness issue, or am I missing something else?</p>