Browse files

Merge branch 'shiftspace'

  • Loading branch information...
2 parents b9b4530 + 38872bf commit 2ce3046fc9d27e954765df14502af0ae284b16cf @swannodette swannodette committed Nov 16, 2009
Showing with 7 additions and 1 deletion.
  1. +7 −1 readme.textile
@@ -110,6 +110,8 @@ Compare this to the example above where the order of JavaScript
function argument evaluation ensures the proper order and no
accumulator via a closure is required.
+h1. Traditional AJAX requests don't compose
For a second example let's examine something a little more
sophisticated, this time let's consider how we would like to write the
program logic- that is, not in terms of requests. Assuming *get* and *add*
@@ -172,7 +174,9 @@ Hmm...
Now that we understand the problem space, how does one go about
solving this? Is it just impossible for requests to be written in such a
-way that we can compose them?
+way that we can compose them?
+h1. A JavaScript-y Solution
While there have been several attempts to do such a thing many of the
solutions require the programmer to adopt a library that is painfully
@@ -223,6 +227,8 @@ decorator called *promise* that does a few interesting things:
functions with non-Promise arguments and they will work just fine!
# Reread 3. This means you can sanely unit test AJAX code!
+h1. A Silly Example
Enough talk, here's an example:

0 comments on commit 2ce3046

Please sign in to comment.