Doc that lazy-seq with-meta forces realization

Description

Applying meta to a lazy-seq causes realization:

This might be surprising, so modify docstring of lazy-seq to mention it.

Patch:

Environment

None

Activity

Show:
Alex Miller
August 13, 2015, 3:03 PM

I'm not really sure where this would be documented. Maybe on the http://clojure.org/metadata page?

Max Penet
August 13, 2015, 3:18 PM

That would make sense yes and on the docstring of lazy-seq as well.

Alex Miller
August 13, 2015, 3:47 PM

I added a sentence to the metadata page and updated the description to be more applicable here to a docstring change.

Michael Blume
August 13, 2015, 7:29 PM

With this patch, with-meta doesn't realize the seq, but realization still only happens once – would this be an acceptable approach?

Michael Blume
August 19, 2015, 10:46 PM

Added test

Assignee

Unassigned

Reporter

Max Penet

Labels

Approval

Triaged

Patch

None

Affects versions

Priority

Minor
Configure