Skip to content

Conversation

daveliepmann
Copy link
Contributor

closes #327

(is (= ["12345678910" 1 10]
((juxt str min max) 1 2 3 4 5 6 7 8 9 10))))

(testing "'returns a fn that is the juxtaposition of those fns'"
Copy link
Member

Choose a reason for hiding this comment

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

Thanks, Dave. The tests look good. One oddity stands out, though.

These four testing forms have double insulation of quoting. Was that intentional? I don't think we're using that anywhere else.

Comment on lines +36 to +42
(testing "wrong-shape input is mostly accepted (and throws when invoked)"
(is (thrown? #?(:cljs :default, :clj java.lang.NullPointerException)
((juxt nil))))
(is (thrown? #?(:cljs :default, :clj Exception)
((juxt (range)))))
(is (thrown? #?(:cljs :default, :clj Exception)
((juxt 1)))))))
Copy link
Contributor

@E-A-Griffin E-A-Griffin Sep 10, 2025

Choose a reason for hiding this comment

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

Suggested change
(testing "wrong-shape input is mostly accepted (and throws when invoked)"
(is (thrown? #?(:cljs :default, :clj java.lang.NullPointerException)
((juxt nil))))
(is (thrown? #?(:cljs :default, :clj Exception)
((juxt (range)))))
(is (thrown? #?(:cljs :default, :clj Exception)
((juxt 1)))))))
(testing "wrong-shape input is mostly accepted (and throws when invoked)"
#?(:cljs (is (thrown? :default ((juxt nil))))
:clj (is (thrown? java.lang.NullPointerException ((juxt nil))))
:clr (is (thrown? System.NullReferenceException ((juxt nil)))
#?@(:cljs [(is (thrown? :default ((juxt (range))))
(is (thrown? :default ((juxt 1))))]
:default [(is (thrown? Exception ((juxt (range))))
(is (thrown? Exception ((juxt 1))))])

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/juxt
3 participants