Created
March 27, 2010 02:00
-
-
Save jashkenas/345649 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Original: | |
fs.readdir 'test', (err, files) -> | |
files.forEach (file) -> | |
return unless file.ext is '.coffee' | |
fs.readFile file, (err, code) -> | |
CoffeeScript.run code | |
# Deferred: | |
[err, files]: defer fs.readdir 'test' | |
files.forEach (file) -> | |
return unless file.ext is '.coffee' | |
[err, code]: defer fs.readFile file | |
CoffeeScript.run code |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment