weavejester / medley

A lightweight library of useful Clojure functions
Eclipse Public License 1.0
870 stars 67 forks source link

Added a bunch of helper functions I use a lot #8

Closed dpp closed 10 years ago

dpp commented 10 years ago

Howdy... I am adding a bunch of helper functions I use a lot.

If you're open to pull requests... cool. If not, no worries... just close the PR... no harm, no foul.

If there's some coding standard I'm missing or in violation of, please let me know.

weavejester commented 10 years ago

It's often useful to split up a PR into separate functions or groups of function that perform similar tasks. That way if a project maintainer likes functions X and Y but not Z, they can pick and choose more easily.

The *v functions are a little too specific for Medley, I think. Similarly, map-tree is pretty specific to a certain use-case.

split-by and some-or are possibilities, but the names don't seem quite right. The split-by function doesn't behave like split-at and split-with, so probably shouldn't begin with split-. The some-or also depends on a situation where you have both nil and false values to be useful, and so far I've steered clear of macros in Medley.

dpp commented 10 years ago

@weavejester thanks for the feedback. Sounds like this PR mostly isn't right for medley. Probably best that I build my own utilities library with the stuff I use regularly.

Thanks for your comments and your excellent contributions to the Clojure community! If there's ever anything I can do to help you out, please ask.

weavejester commented 10 years ago

Thanks for the contribution. I want to keep Medley fairly small, so I'll likely reject more PRs than I accept, but the work is appreciated. If you like, drop me an email when you finish your library and I'll put it on clojuretoolbox.com