Created
October 19, 2011 13:10
-
-
Save colwilson/1298237 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# define the map function | |
# this function will be called for every basket and | |
# is used to emit whatever information that we want | |
# about the contents each basket, although the data | |
# must be in the format (key, value) although | |
# value can be an object if nescessary | |
mapFunc = -> | |
key = @fruit | |
values = { | |
count: @count, | |
baskets: 1 | |
} | |
emit(key, values) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment