Skip to content

Conversation

JohnFord
Copy link
Contributor

@JohnFord JohnFord commented May 9, 2011

Hey Dave,

I'm not certain if this is what you were thinking but I tried to make the function behave per what you put in the "recipe hitlist".

Also, I am completely new to coffeescript and mainly using this as a learning opportunity as much as anything so feel free to tell me if this is total crap.

Thanks,

John

dbrady added a commit that referenced this pull request May 9, 2011
Added arrays/filtering-arrays
@dbrady dbrady merged commit 7580492 into coffeescript-cookbook:master May 9, 2011
@dbrady
Copy link
Member

dbrady commented May 9, 2011

John, this is fantastic! You are the first person to join the contributors team! I'm not EXACTLY certain how this works, but I think it means you can do this to your repository:

git remote rm origin
git remote origin add git@github.com:coffeescript-cookbook/coffeescript-cookbook.github.com.git

And then do a git pull. You can now commit directly to the cookbook! With great power comes great abuse, so go nuts!

I have two quick suggestions for you: one, change the hashrocket to be on newlines, e.g.:

filtered_array = array.filter (x) -> x % 3 == 0

=> [2,4,6,8,10]

The reason: One, simple style consistency. Two, I'm getting ready to write an automagic code checker that will load up and evaluate script code, and whenever it sees # => on a new line it will check the current evaluation to see if it matches, and if it doesn't it will flag that snippet as broken so we can find and fix bad recipes.

Second thing: Add yourself to the author's page! Welcome aboard!

peterhellberg pushed a commit that referenced this pull request Sep 12, 2012
peterhellberg referenced this pull request in peterhellberg/coffeescript-cookbook.github.com Aug 18, 2013
peterhellberg pushed a commit that referenced this pull request Sep 18, 2014
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

Successfully merging this pull request may close these issues.

2 participants