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

Attachments

2

Activity

Show:

Michael Blume August 19, 2015 at 10:46 PM

Added test

Michael Blume August 13, 2015 at 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?

Alex Miller August 13, 2015 at 3:47 PM

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

Max Penet August 13, 2015 at 3:18 PM

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

Alex Miller August 13, 2015 at 3:03 PM

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

Details

Assignee

Reporter

Labels

Approval

Triaged

Priority

Affects versions

Created August 13, 2015 at 2:40 PM
Updated September 15, 2018 at 2:10 PM