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

pmap better than map for "walk" for processing images #70

Open
lkrubner opened this issue Feb 7, 2014 · 2 comments
Open

pmap better than map for "walk" for processing images #70

lkrubner opened this issue Feb 7, 2014 · 2 comments

Comments

@lkrubner
Copy link

lkrubner commented Feb 7, 2014

About this function:

(defn walk
"Lazily walk depth-first over the directory structure starting at
'path' calling 'func' with three arguments [root dirs files].
Returns a sequence of the results."
[func path](map #%28apply func %%29 %28iterate-dir path%29))

If I want to iterate over a directory of images, and generate a thumbnail for those images, then I should use "pmap" rather than "map". I am writing a custom version of this function for myself, but perhaps you could make "map" a variable?

@amalloy
Copy link
Collaborator

amalloy commented Feb 7, 2014

Just pass list as func, and then pmap over the resulting structure to do whatever?

@lkrubner
Copy link
Author

lkrubner commented Feb 9, 2014

Great idea.

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

No branches or pull requests

2 participants