Welcome! Please see the About page for a little more info on how this works.

+2 votes
in Metadata by
closed by

from slack: https://clojurians.slack.com/archives/C03S1KBA2/p1662437976861689

(range 0 5 1.0) ;=> (0 1.0 2.0 3.0 4.0)
(with-meta (range 0 5 1.0) {}) ;=> (5)

user=> (def x (range 0 5 1.0))
#'user/x
user=> x
(0 1.0 2.0 3.0 4.0)
user=> (with-meta x {})
(5 1.0 2.0 3.0 4.0)

I noticed that it looks like there might be some out-of-order argument called

the with-meta call in Range.java:

public Obj withMeta(IPersistentMap meta){
	if(meta == _meta)
		return this;
	return new Range(meta, end, start, step, boundsCheck, _chunk, _chunkNext);
}

and that constructor has the end and start swapped:

private Range(IPersistentMap meta, Object start, Object end, Object step, BoundsCheck boundsCheck, IChunk chunk, ISeq chunkNext){
closed with the note: Fixed in Clojure 1.12.0-alpha2

1 Answer

0 votes
by

Logged as https://clojure.atlassian.net/browse/CLJ-2721, we'll get that in 1.12. Thx!

...