Permalink
Browse files

use the reduce method to make it compatible with "try CoffeeScript"

  • Loading branch information...
1 parent 1c22f98 commit c7ecce71febc6d2e6524fb9525efea70499b7ec6 @raganwald raganwald committed Jan 30, 2012
Showing with 4 additions and 20 deletions.
  1. +1 −1 2012/01/reuseable-abstractions.md
  2. +3 −19 homoiconic.tmproj
View
2 2012/01/reuseable-abstractions.md
@@ -49,7 +49,7 @@ There are tremendous benefits to a language making these two things equivalent "
```coffeescript
dfunc = (dictionary) ->
(indices...) ->
- _.reduce indices, (a, i) ->
+ indices.reduce (a, i) ->
a[i]
, dictionary
```
View
22 homoiconic.tmproj
@@ -70,30 +70,14 @@
<key>caret</key>
<dict>
<key>column</key>
- <integer>0</integer>
+ <integer>9</integer>
<key>line</key>
- <integer>89</integer>
+ <integer>39</integer>
</dict>
- <key>columnSelection</key>
- <false/>
<key>firstVisibleColumn</key>
<integer>0</integer>
<key>firstVisibleLine</key>
- <integer>0</integer>
- <key>selectFrom</key>
- <dict>
- <key>column</key>
- <integer>38</integer>
- <key>line</key>
- <integer>95</integer>
- </dict>
- <key>selectTo</key>
- <dict>
- <key>column</key>
- <integer>0</integer>
- <key>line</key>
- <integer>89</integer>
- </dict>
+ <integer>11</integer>
</dict>
<key>dumping_ground/coffeescript_and_underscore.md</key>
<dict>

0 comments on commit c7ecce7

Please sign in to comment.