{"action":"created","comment":{"url":"https://api.github.com/repos/alexschneider/teascript/pulls/comments/24431731","id":24431731,"diff_hunk":"@@ -204,6 +201,41 @@ for color in <\"red\",\"yellow\",\"green\",\"blue\">:\n     out(color)\n end\n ```\n+\n+#### while loops\n+While loops can be used one of two ways.\n+```\n+# If the while loop has a single expression in its\n+# body it can be written into a single line.\n+counter := 0\n+while counter < 28: out(++counter)\n+\n+# Otherwise, we apply the traditional model. Don't forget\n+# the 'end' at the bottom!\n+\n+counter = 10\n+while counter > 0:\n+    out(--counter)\n+end\n+out('Happy New Year!')\n+```\n+\n+#### Functions\n+Functions in teascript look a lot like the functions in coffeescript. Functions are \n+first-level objects.\n+\n+```\n+repeat = (str, n) ->\n+    new_str := \"\"\n+    for i in 1..n","path":"README.md","position":44,"original_position":44,"commit_id":"db3c4dff8b11adca2f7fc9d46851dad407224f5d","original_commit_id":"db3c4dff8b11adca2f7fc9d46851dad407224f5d","user":{"login":"alexschneider","id":5846376,"avatar_url":"https://avatars.githubusercontent.com/u/5846376?v=3","gravatar_id":"","url":"https://api.github.com/users/alexschneider","html_url":"https://github.com/alexschneider","followers_url":"https://api.github.com/users/alexschneider/followers","following_url":"https://api.github.com/users/alexschneider/following{/other_user}","gists_url":"https://api.github.com/users/alexschneider/gists{/gist_id}","starred_url":"https://api.github.com/users/alexschneider/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexschneider/subscriptions","organizations_url":"https://api.github.com/users/alexschneider/orgs","repos_url":"https://api.github.com/users/alexschneider/repos","events_url":"https://api.github.com/users/alexschneider/events{/privacy}","received_events_url":"https://api.github.com/users/alexschneider/received_events","type":"User","site_admin":false},"body":"This should have a `:` at the end of the line","created_at":"2015-02-10T17:34:39Z","updated_at":"2015-02-10T17:34:39Z","html_url":"https://github.com/alexschneider/teascript/pull/17#discussion_r24431731","pull_request_url":"https://api.github.com/repos/alexschneider/teascript/pulls/17","_links":{"self":{"href":"https://api.github.com/repos/alexschneider/teascript/pulls/comments/24431731"},"html":{"href":"https://github.com/alexschneider/teascript/pull/17#discussion_r24431731"},"pull_request":{"href":"https://api.github.com/repos/alexschneider/teascript/pulls/17"}}},"pull_request":{"url":"https://api.github.com/repos/alexschneider/teascript/pulls/17","id":29026301,"html_url":"https://github.com/alexschneider/teascript/pull/17","diff_url":"https://github.com/alexschneider/teascript/pull/17.diff","patch_url":"https://github.com/alexschneider/teascript/pull/17.patch","issue_url":"https://api.github.com/repos/alexschneider/teascript/issues/17","number":17,"state":"open","locked":false,"title":"Added functions and while loops.","user":{"login":"juansc","id":6529816,"avatar_url":"https://avatars.githubusercontent.com/u/6529816?v=3","gravatar_id":"","url":"https://api.github.com/users/juansc","html_url":"https://github.com/juansc","followers_url":"https://api.github.com/users/juansc/followers","following_url":"https://api.github.com/users/juansc/following{/other_user}","gists_url":"https://api.github.com/users/juansc/gists{/gist_id}","starred_url":"https://api.github.com/users/juansc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juansc/subscriptions","organizations_url":"https://api.github.com/users/juansc/orgs","repos_url":"https://api.github.com/users/juansc/repos","events_url":"https://api.github.com/users/juansc/events{/privacy}","received_events_url":"https://api.github.com/users/juansc/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-02-10T17:21:42Z","updated_at":"2015-02-10T17:34:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b52c34adc8f9adc6371bb51eebb6d03317918f8c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/alexschneider/teascript/pulls/17/commits","review_comments_url":"https://api.github.com/repos/alexschneider/teascript/pulls/17/comments","review_comment_url":"https://api.github.com/repos/alexschneider/teascript/pulls/comments/{number}","comments_url":"https://api.github.com/repos/alexschneider/teascript/issues/17/comments","statuses_url":"https://api.github.com/repos/alexschneider/teascript/statuses/db3c4dff8b11adca2f7fc9d46851dad407224f5d","head":{"label":"alexschneider:jsc/readme","ref":"jsc/readme","sha":"db3c4dff8b11adca2f7fc9d46851dad407224f5d","user":{"login":"alexschneider","id":5846376,"avatar_url":"https://avatars.githubusercontent.com/u/5846376?v=3","gravatar_id":"","url":"https://api.github.com/users/alexschneider","html_url":"https://github.com/alexschneider","followers_url":"https://api.github.com/users/alexschneider/followers","following_url":"https://api.github.com/users/alexschneider/following{/other_user}","gists_url":"https://api.github.com/users/alexschneider/gists{/gist_id}","starred_url":"https://api.github.com/users/alexschneider/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexschneider/subscriptions","organizations_url":"https://api.github.com/users/alexschneider/orgs","repos_url":"https://api.github.com/users/alexschneider/repos","events_url":"https://api.github.com/users/alexschneider/events{/privacy}","received_events_url":"https://api.github.com/users/alexschneider/received_events","type":"User","site_admin":false},"repo":{"id":24826046,"name":"teascript","full_name":"alexschneider/teascript","owner":{"login":"alexschneider","id":5846376,"avatar_url":"https://avatars.githubusercontent.com/u/5846376?v=3","gravatar_id":"","url":"https://api.github.com/users/alexschneider","html_url":"https://github.com/alexschneider","followers_url":"https://api.github.com/users/alexschneider/followers","following_url":"https://api.github.com/users/alexschneider/following{/other_user}","gists_url":"https://api.github.com/users/alexschneider/gists{/gist_id}","starred_url":"https://api.github.com/users/alexschneider/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexschneider/subscriptions","organizations_url":"https://api.github.com/users/alexschneider/orgs","repos_url":"https://api.github.com/users/alexschneider/repos","events_url":"https://api.github.com/users/alexschneider/events{/privacy}","received_events_url":"https://api.github.com/users/alexschneider/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/alexschneider/teascript","description":"","fork":false,"url":"https://api.github.com/repos/alexschneider/teascript","forks_url":"https://api.github.com/repos/alexschneider/teascript/forks","keys_url":"https://api.github.com/repos/alexschneider/teascript/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alexschneider/teascript/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alexschneider/teascript/teams","hooks_url":"https://api.github.com/repos/alexschneider/teascript/hooks","issue_events_url":"https://api.github.com/repos/alexschneider/teascript/issues/events{/number}","events_url":"https://api.github.com/repos/alexschneider/teascript/events","assignees_url":"https://api.github.com/repos/alexschneider/teascript/assignees{/user}","branches_url":"https://api.github.com/repos/alexschneider/teascript/branches{/branch}","tags_url":"https://api.github.com/repos/alexschneider/teascript/tags","blobs_url":"https://api.github.com/repos/alexschneider/teascript/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alexschneider/teascript/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alexschneider/teascript/git/refs{/sha}","trees_url":"https://api.github.com/repos/alexschneider/teascript/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alexschneider/teascript/statuses/{sha}","languages_url":"https://api.github.com/repos/alexschneider/teascript/languages","stargazers_url":"https://api.github.com/repos/alexschneider/teascript/stargazers","contributors_url":"https://api.github.com/repos/alexschneider/teascript/contributors","subscribers_url":"https://api.github.com/repos/alexschneider/teascript/subscribers","subscription_url":"https://api.github.com/repos/alexschneider/teascript/subscription","commits_url":"https://api.github.com/repos/alexschneider/teascript/commits{/sha}","git_commits_url":"https://api.github.com/repos/alexschneider/teascript/git/commits{/sha}","comments_url":"https://api.github.com/repos/alexschneider/teascript/comments{/number}","issue_comment_url":"https://api.github.com/repos/alexschneider/teascript/issues/comments/{number}","contents_url":"https://api.github.com/repos/alexschneider/teascript/contents/{+path}","compare_url":"https://api.github.com/repos/alexschneider/teascript/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alexschneider/teascript/merges","archive_url":"https://api.github.com/repos/alexschneider/teascript/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alexschneider/teascript/downloads","issues_url":"https://api.github.com/repos/alexschneider/teascript/issues{/number}","pulls_url":"https://api.github.com/repos/alexschneider/teascript/pulls{/number}","milestones_url":"https://api.github.com/repos/alexschneider/teascript/milestones{/number}","notifications_url":"https://api.github.com/repos/alexschneider/teascript/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alexschneider/teascript/labels{/name}","releases_url":"https://api.github.com/repos/alexschneider/teascript/releases{/id}","created_at":"2014-10-05T20:53:46Z","updated_at":"2015-02-10T17:21:19Z","pushed_at":"2015-02-10T17:21:19Z","git_url":"git://github.com/alexschneider/teascript.git","ssh_url":"git@github.com:alexschneider/teascript.git","clone_url":"https://github.com/alexschneider/teascript.git","svn_url":"https://github.com/alexschneider/teascript","homepage":null,"size":1070,"stargazers_count":2,"watchers_count":2,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":2,"default_branch":"master"}},"base":{"label":"alexschneider:master","ref":"master","sha":"d8190ef89de21ca788783dc277584bca7e1d0a92","user":{"login":"alexschneider","id":5846376,"avatar_url":"https://avatars.githubusercontent.com/u/5846376?v=3","gravatar_id":"","url":"https://api.github.com/users/alexschneider","html_url":"https://github.com/alexschneider","followers_url":"https://api.github.com/users/alexschneider/followers","following_url":"https://api.github.com/users/alexschneider/following{/other_user}","gists_url":"https://api.github.com/users/alexschneider/gists{/gist_id}","starred_url":"https://api.github.com/users/alexschneider/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexschneider/subscriptions","organizations_url":"https://api.github.com/users/alexschneider/orgs","repos_url":"https://api.github.com/users/alexschneider/repos","events_url":"https://api.github.com/users/alexschneider/events{/privacy}","received_events_url":"https://api.github.com/users/alexschneider/received_events","type":"User","site_admin":false},"repo":{"id":24826046,"name":"teascript","full_name":"alexschneider/teascript","owner":{"login":"alexschneider","id":5846376,"avatar_url":"https://avatars.githubusercontent.com/u/5846376?v=3","gravatar_id":"","url":"https://api.github.com/users/alexschneider","html_url":"https://github.com/alexschneider","followers_url":"https://api.github.com/users/alexschneider/followers","following_url":"https://api.github.com/users/alexschneider/following{/other_user}","gists_url":"https://api.github.com/users/alexschneider/gists{/gist_id}","starred_url":"https://api.github.com/users/alexschneider/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexschneider/subscriptions","organizations_url":"https://api.github.com/users/alexschneider/orgs","repos_url":"https://api.github.com/users/alexschneider/repos","events_url":"https://api.github.com/users/alexschneider/events{/privacy}","received_events_url":"https://api.github.com/users/alexschneider/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/alexschneider/teascript","description":"","fork":false,"url":"https://api.github.com/repos/alexschneider/teascript","forks_url":"https://api.github.com/repos/alexschneider/teascript/forks","keys_url":"https://api.github.com/repos/alexschneider/teascript/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alexschneider/teascript/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alexschneider/teascript/teams","hooks_url":"https://api.github.com/repos/alexschneider/teascript/hooks","issue_events_url":"https://api.github.com/repos/alexschneider/teascript/issues/events{/number}","events_url":"https://api.github.com/repos/alexschneider/teascript/events","assignees_url":"https://api.github.com/repos/alexschneider/teascript/assignees{/user}","branches_url":"https://api.github.com/repos/alexschneider/teascript/branches{/branch}","tags_url":"https://api.github.com/repos/alexschneider/teascript/tags","blobs_url":"https://api.github.com/repos/alexschneider/teascript/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alexschneider/teascript/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alexschneider/teascript/git/refs{/sha}","trees_url":"https://api.github.com/repos/alexschneider/teascript/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alexschneider/teascript/statuses/{sha}","languages_url":"https://api.github.com/repos/alexschneider/teascript/languages","stargazers_url":"https://api.github.com/repos/alexschneider/teascript/stargazers","contributors_url":"https://api.github.com/repos/alexschneider/teascript/contributors","subscribers_url":"https://api.github.com/repos/alexschneider/teascript/subscribers","subscription_url":"https://api.github.com/repos/alexschneider/teascript/subscription","commits_url":"https://api.github.com/repos/alexschneider/teascript/commits{/sha}","git_commits_url":"https://api.github.com/repos/alexschneider/teascript/git/commits{/sha}","comments_url":"https://api.github.com/repos/alexschneider/teascript/comments{/number}","issue_comment_url":"https://api.github.com/repos/alexschneider/teascript/issues/comments/{number}","contents_url":"https://api.github.com/repos/alexschneider/teascript/contents/{+path}","compare_url":"https://api.github.com/repos/alexschneider/teascript/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alexschneider/teascript/merges","archive_url":"https://api.github.com/repos/alexschneider/teascript/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alexschneider/teascript/downloads","issues_url":"https://api.github.com/repos/alexschneider/teascript/issues{/number}","pulls_url":"https://api.github.com/repos/alexschneider/teascript/pulls{/number}","milestones_url":"https://api.github.com/repos/alexschneider/teascript/milestones{/number}","notifications_url":"https://api.github.com/repos/alexschneider/teascript/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alexschneider/teascript/labels{/name}","releases_url":"https://api.github.com/repos/alexschneider/teascript/releases{/id}","created_at":"2014-10-05T20:53:46Z","updated_at":"2015-02-10T17:21:19Z","pushed_at":"2015-02-10T17:21:19Z","git_url":"git://github.com/alexschneider/teascript.git","ssh_url":"git@github.com:alexschneider/teascript.git","clone_url":"https://github.com/alexschneider/teascript.git","svn_url":"https://github.com/alexschneider/teascript","homepage":null,"size":1070,"stargazers_count":2,"watchers_count":2,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alexschneider/teascript/pulls/17"},"html":{"href":"https://github.com/alexschneider/teascript/pull/17"},"issue":{"href":"https://api.github.com/repos/alexschneider/teascript/issues/17"},"comments":{"href":"https://api.github.com/repos/alexschneider/teascript/issues/17/comments"},"review_comments":{"href":"https://api.github.com/repos/alexschneider/teascript/pulls/17/comments"},"review_comment":{"href":"https://api.github.com/repos/alexschneider/teascript/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/alexschneider/teascript/pulls/17/commits"},"statuses":{"href":"https://api.github.com/repos/alexschneider/teascript/statuses/db3c4dff8b11adca2f7fc9d46851dad407224f5d"}}}}