Skip to content

Instantly share code, notes, and snippets.

@mpenet

mpenet/lazy-seq? Secret

Created August 13, 2015 11:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mpenet/5231071c9f8217d13fd3 to your computer and use it in GitHub Desktop.
Save mpenet/5231071c9f8217d13fd3 to your computer and use it in GitHub Desktop.
(def x (lazy-seq (prn :realized)))
#'user/x
(def x (vary-meta (lazy-seq (prn :realized)) assoc :foo :bar))
:realized
#'user/x
@puredanger
Copy link

LazySeq.withMeta() calls seq() on itself - that's the reason. Does not seem like that would have to be the case though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment