Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Making clear that the argument to head is a function that calls the funct #1

Merged
merged 1 commit into from

2 participants

@lorensr

Making clear that the argument to head is a function that calls the function title. The old way describes it as head(title 'a').

@lorensr lorensr Making clear that the argument to head is a function that calls the f…
…unction title. The old way describes it as head(title 'a').
0aeb1ec
@mark-hahn mark-hahn merged commit fb980ee into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 15, 2011
  1. @lorensr

    Making clear that the argument to head is a function that calls the f…

    lorensr authored
    …unction title. The old way describes it as head(title 'a').
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 2 deletions.
  1. +1 −2  README.md
View
3  README.md
@@ -1,4 +1,3 @@
-
A Beginners's Introduction to CoffeeKup
===
By Mark Hahn
@@ -30,7 +29,7 @@ So how did `head ->` become `<head>`? And where does the output come from? Ther
The top part of the added code defines a lot of things, the most important of which are the functions who share their names with all the possible HTML tags. These functions, when executed, generate the associated HTML code and append it to a buffer, also defined in the invisible code, that accumulates all of the output HTML. When all of your template code has been executed, the buffer containing the complete HTML is then returned as output by an invisible `return buffer` statement added to the bottom of the template.
-Let's walk through the execution of the Hello World template code. First the `head` function is called with the `title` function as an argument. The `head` function adds the `<head>` text to the buffer, then calls the `title` function which adds it's own HTML to the buffer, and finally adds the closing `</head>`.
+Let's walk through the execution of the Hello World template code. First the `head` function is called with one argument, a one-line function that calls `title`. The `head` function adds the `<head>` text to the buffer, then calls the `title` function which adds it's own HTML to the buffer, and finally adds the closing `</head>`.
The `title` function was called with `"Hello World"` as its only argument. In a case like this, the function only had to wrap `<title>` and `</title>` around the string it was passed and add the whole thing to the buffer. The `body` function did the same thing as the `head` function except that the function passed to it added nothing to the output buffer.
Something went wrong with that request. Please try again.