Skip to content

Conversation

@super7ramp
Copy link
Contributor

This closes #393.

#?(:cljs (is (nil? (peek #queue [])))
:default (is (nil? (peek PersistentQueue/EMPTY))))
#?(:cljs (is (= :a (peek #queue [:a :b :c])))
:default (is (= :a (peek (conj PersistentQueue/EMPTY :a :b :c))))))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Get what you're going for here (I had a similar suggestion for pop) but after talking with @jeaye I think we're better off not testing clojure.lang.PersistentQueue as most platforms don't support it and it's not something clj/cljr "easily" expose (i.e. there's not a way to naturally construct the structure with some clojure.core function like (queue 0 1 2))

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed tests on queues.

This closes jank-lang#393.
@jeaye jeaye merged commit 6bcd5d9 into jank-lang:main Nov 2, 2025
2 checks passed
@jeaye
Copy link
Member

jeaye commented Nov 2, 2025

Looks good!

@super7ramp super7ramp deleted the peek branch November 2, 2025 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

clojure.core/peek

3 participants