Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test for partial #30

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jake-jake-jake
Copy link
Contributor

No description provided.

(t/is (= 3 (simple-use))))
(let [lazily-evaluated (partial inc 2 3)]
#?(:clj (t/is (thrown? Exception (lazily-evaluated)))
:cljs (t/is (thrown? js/Error (lazily-evaluated)))))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't know if handling the JS case is needed, but I thought I'd add this. I can remove if that makes more sense.

(defn test-fn [& args]
(into [] args))

(t/deftest test-partial []
Copy link
Member

Choose a reason for hiding this comment

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

What do you think about:

  1. Chaining partials
  2. Including lazy sequences
  3. A partial partial

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants