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 util fns like dispatch-1 dispatch-2 etc. #16

Closed
camsaul opened this issue Sep 10, 2019 · 1 comment · Fixed by #132
Closed

Add util fns like dispatch-1 dispatch-2 etc. #16

camsaul opened this issue Sep 10, 2019 · 1 comment · Fixed by #132
Labels
enhancement New feature or request good first issue Good for newcomers
Milestone

Comments

@camsaul
Copy link
Owner

camsaul commented Sep 10, 2019

Functions that can dispatch on the first n values (optionally passing them to another fn) would be nice. e.g. something like

(dispatch-1 keyword) that would be equivalent to (fn [k & _] (keyword k), but with better per-arity optimizations. I have found myself writing these sorts of functions over and over again, and having a set of util fns for common use cases seems like a win.

@camsaul camsaul added the enhancement New feature or request label Sep 11, 2019
@camsaul camsaul added this to the 0.15.0 milestone Sep 9, 2022
@camsaul
Copy link
Owner Author

camsaul commented Sep 9, 2022

In Toucan 2 I named these dispatch-on-first-arg, dispatch-on-first-two-args, etc... maybe those names are a little clearer. TBD

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant