Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix indents

  • Loading branch information...
commit 4a8d1449c689c505724266e82e15ff981eeba84e 1 parent ad330b0
@raganwald raganwald authored
Showing with 7 additions and 7 deletions.
  1. +6 −6 2012/10/idiot.cs.md
  2. +1 −1  2012/10/idiot.js.md
View
12 2012/10/idiot.cs.md
@@ -8,16 +8,16 @@ I = (x) -> x
In his rightfully famous [To Mock a Mockingbird](http://www.amazon.com/gp/product/0192801422?ie=UTF8&tag=raganwald001-20&linkCode=as2&camp=1789&creative=9325&creativeASIN=0192801422), Raymond Smullyan nicknamed it "The Idiot Bird" for its singlemindedness.
-`I`--so named because mathematicians (and many programmers) call it the [Identity Function](https://en.wikipedia.org/wiki/Identity_function)--has some useful applications in JavaScript. Sometimes you have a function or method that takes an optional filter, like this:
+`I`--so named because mathematicians (and many programmers) call it the [Identity Function](https://en.wikipedia.org/wiki/Identity_function)--has some useful applications in JavaScript. Sometimes you have a function or method that takes an optional mapping function, like this:
```coffeescript
class TheyMightBeGiants
# ...
all: (fn) ->
- if fn?
- fn(giant) for giant in giants
- else
- giants
+ if fn?
+ fn(giant) for giant in giants
+ else
+ giants
```
Given:
@@ -26,7 +26,7 @@ Given:
band = new TheyMightBeGiants(...)
```
-You can call either `band.all()` or to get all the band members or `band( (x) -> x.name )` to get their names. An "idiot" will clean things up and get rid of the `if`:
+You can call either `band.all()` or to get all the band members or `band.all( (x) -> x.name )` to get their names. An "idiot" will clean things up and get rid of the `if`:
```coffeescript
class TheyMightBeGiants
View
2  2012/10/idiot.js.md
@@ -8,7 +8,7 @@ var I = function (x) { return x }
In his rightfully famous [To Mock a Mockingbird](http://www.amazon.com/gp/product/0192801422?ie=UTF8&tag=raganwald001-20&linkCode=as2&camp=1789&creative=9325&creativeASIN=0192801422), Raymond Smullyan nicknamed it "The Idiot Bird" for its singlemindedness.
-`I`--so named because mathematicians (and many programmers) call it the [Identity Function](https://en.wikipedia.org/wiki/Identity_function)--has some useful applications in JavaScript. Sometimes you have a function or method that takes an optional filter, like this:
+`I`--so named because mathematicians (and many programmers) call it the [Identity Function](https://en.wikipedia.org/wiki/Identity_function)--has some useful applications in JavaScript. Sometimes you have a function or method that takes an optional mapping function, like this:
```javascript
TheyMightBeGiants.prototype.all = function (fn) {
Please sign in to comment.
Something went wrong with that request. Please try again.