diff --git a/documentation/coffee/overview.coffee b/documentation/coffee/overview.coffee
index 44e4ec95..295f38a1 100644
--- a/documentation/coffee/overview.coffee
+++ b/documentation/coffee/overview.coffee
@@ -18,5 +18,12 @@ math: {
cube: x => x * square(x)
}
+# Splats:
+race: winner, *runners =>
+ print(winner, runners)
+
+# Existence:
+alert("I knew it!") if elvis?
+
# Array comprehensions:
cubed_list: math.cube(num) for num in list
diff --git a/documentation/index.html.erb b/documentation/index.html.erb
index 1ed90f1a..6ba321da 100644
--- a/documentation/index.html.erb
+++ b/documentation/index.html.erb
@@ -108,7 +108,7 @@
For a longer CoffeeScript example, check out
Underscore.coffee, a port
of Underscore.js
- to CoffeeScript, which, when compiled, passes the complete Underscore test suite.
+ to CoffeeScript, which, when compiled, can pass the complete Underscore test suite.
Installation and Usage
@@ -537,6 +537,11 @@ coffee --print app/scripts/*.coffee > concatenation.js
+ -
+ A clean, safe syntax for manipulating the prototype chain, and performing
+ inheritance. extends and super are the start of this, but
+ aren't a complete answer.
+
-
A CoffeeScript version of the compiler, perhaps using Alessandro Warth's
OMeta.
diff --git a/documentation/js/existence.js b/documentation/js/existence.js
index 60e9e922..aa585316 100644
--- a/documentation/js/existence.js
+++ b/documentation/js/existence.js
@@ -1,6 +1,6 @@
(function(){
var solipsism;
- if ((typeof mind !== 'undefined' && mind !== null) && !(typeof world !== 'undefined' && world !== null)) {
+ if ((typeof mind !== "undefined" && mind !== null) && !(typeof world !== "undefined" && world !== null)) {
solipsism = true;
}
})();
\ No newline at end of file
diff --git a/documentation/js/overview.js b/documentation/js/overview.js
index 637697ab..e3832187 100644
--- a/documentation/js/overview.js
+++ b/documentation/js/overview.js
@@ -1,5 +1,5 @@
(function(){
- var __a, __b, __c, __d, cubed_list, list, math, num, number, opposite_day, square;
+ var __a, __b, __c, __d, cubed_list, list, math, num, number, opposite_day, race, square;
// Assignment:
number = 42;
opposite_day = true;
@@ -21,6 +21,16 @@
return x * square(x);
}
};
+ // Splats:
+ race = function race(winner) {
+ var runners;
+ runners = Array.prototype.slice.call(arguments, 1);
+ return print(winner, runners);
+ };
+ // Existence:
+ if ((typeof elvis !== "undefined" && elvis !== null)) {
+ alert("I knew it!");
+ }
// Array comprehensions:
cubed_list = (function() {
__a = list;
diff --git a/documentation/underscore.html b/documentation/underscore.html
index 674adb89..b502cf22 100644
--- a/documentation/underscore.html
+++ b/documentation/underscore.html
@@ -9,6 +9,10 @@
body {
margin: 0; padding: 0;
}
+ pre.idle {
+ font-family: "Monaco", "Consolas", monospace;
+ font-size: 12px;
+ }
@@ -607,6 +611,6 @@
591
592
593 wrapper.prototype.value: => this._wrapped
-
+