{"action":"created","comment":{"url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/pulls/comments/22621139","id":22621139,"diff_hunk":"@@ -2,4 +2,61 @@ class Patterns\n   def is_real\n     true\n   end\n+\n+  def is_palindrome arr\n+  \tif arr.length == 0 || arr.length == 1\n+  \t\treturn true\n+  \tend\n+  \treturn is_palindrome(arr) if arr.shift == arr.pop\n+  \treturn false\n+  end\n+\n+  def increase_by n, arr\n+  \tfor i in 0...arr.length-1\n+  \t\tif arr[i] != (arr[i+1]-n)\n+  \t\t\treturn false\n+  \t\tend\n+  \tend\n+  \treturn true\n+  end\n+\n+  def decrease_by n, arr\n+  \tincrease_by(n, arr.reverse)\n+  end\t\n+\n+end\n+\n+\n+def arr_eq? arr1, arr2\n+\tarr1.join(\"\") == arr2.join(\"\")\n end\n+\n+patterns = Patterns.new\n+\n+p   patterns.is_real","path":"patterns.rb","position":35,"original_position":35,"commit_id":"4cb9c96969eac9500aba315630bbebac09861cea","original_commit_id":"4cb9c96969eac9500aba315630bbebac09861cea","user":{"login":"mweitzel","id":318925,"avatar_url":"https://avatars.githubusercontent.com/u/318925?v=3","gravatar_id":"","url":"https://api.github.com/users/mweitzel","html_url":"https://github.com/mweitzel","followers_url":"https://api.github.com/users/mweitzel/followers","following_url":"https://api.github.com/users/mweitzel/following{/other_user}","gists_url":"https://api.github.com/users/mweitzel/gists{/gist_id}","starred_url":"https://api.github.com/users/mweitzel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mweitzel/subscriptions","organizations_url":"https://api.github.com/users/mweitzel/orgs","repos_url":"https://api.github.com/users/mweitzel/repos","events_url":"https://api.github.com/users/mweitzel/events{/privacy}","received_events_url":"https://api.github.com/users/mweitzel/received_events","type":"User","site_admin":false},"body":"can probably nix this now","created_at":"2015-01-07T22:19:29Z","updated_at":"2015-01-07T22:19:29Z","html_url":"https://github.com/mollstacks/clocksonclocksonclocks/pull/1#discussion_r22621139","pull_request_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/pulls/comments/22621139"},"html":{"href":"https://github.com/mollstacks/clocksonclocksonclocks/pull/1#discussion_r22621139"},"pull_request":{"href":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/pulls/1","id":26982715,"html_url":"https://github.com/mollstacks/clocksonclocksonclocks/pull/1","diff_url":"https://github.com/mollstacks/clocksonclocksonclocks/pull/1.diff","patch_url":"https://github.com/mollstacks/clocksonclocksonclocks/pull/1.patch","issue_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/issues/1","number":1,"state":"open","locked":false,"title":"Pattern matching functions","user":{"login":"mollstacks","id":8866147,"avatar_url":"https://avatars.githubusercontent.com/u/8866147?v=3","gravatar_id":"","url":"https://api.github.com/users/mollstacks","html_url":"https://github.com/mollstacks","followers_url":"https://api.github.com/users/mollstacks/followers","following_url":"https://api.github.com/users/mollstacks/following{/other_user}","gists_url":"https://api.github.com/users/mollstacks/gists{/gist_id}","starred_url":"https://api.github.com/users/mollstacks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mollstacks/subscriptions","organizations_url":"https://api.github.com/users/mollstacks/orgs","repos_url":"https://api.github.com/users/mollstacks/repos","events_url":"https://api.github.com/users/mollstacks/events{/privacy}","received_events_url":"https://api.github.com/users/mollstacks/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-01-07T19:53:45Z","updated_at":"2015-01-07T22:19:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"844faa4c1bb37f635369c5119ba980cd3f5e7e75","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/pulls/1/commits","review_comments_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/pulls/1/comments","review_comment_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/pulls/comments/{number}","comments_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/issues/1/comments","statuses_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/statuses/4cb9c96969eac9500aba315630bbebac09861cea","head":{"label":"mollstacks:patterns","ref":"patterns","sha":"4cb9c96969eac9500aba315630bbebac09861cea","user":{"login":"mollstacks","id":8866147,"avatar_url":"https://avatars.githubusercontent.com/u/8866147?v=3","gravatar_id":"","url":"https://api.github.com/users/mollstacks","html_url":"https://github.com/mollstacks","followers_url":"https://api.github.com/users/mollstacks/followers","following_url":"https://api.github.com/users/mollstacks/following{/other_user}","gists_url":"https://api.github.com/users/mollstacks/gists{/gist_id}","starred_url":"https://api.github.com/users/mollstacks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mollstacks/subscriptions","organizations_url":"https://api.github.com/users/mollstacks/orgs","repos_url":"https://api.github.com/users/mollstacks/repos","events_url":"https://api.github.com/users/mollstacks/events{/privacy}","received_events_url":"https://api.github.com/users/mollstacks/received_events","type":"User","site_admin":false},"repo":{"id":28927001,"name":"clocksonclocksonclocks","full_name":"mollstacks/clocksonclocksonclocks","owner":{"login":"mollstacks","id":8866147,"avatar_url":"https://avatars.githubusercontent.com/u/8866147?v=3","gravatar_id":"","url":"https://api.github.com/users/mollstacks","html_url":"https://github.com/mollstacks","followers_url":"https://api.github.com/users/mollstacks/followers","following_url":"https://api.github.com/users/mollstacks/following{/other_user}","gists_url":"https://api.github.com/users/mollstacks/gists{/gist_id}","starred_url":"https://api.github.com/users/mollstacks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mollstacks/subscriptions","organizations_url":"https://api.github.com/users/mollstacks/orgs","repos_url":"https://api.github.com/users/mollstacks/repos","events_url":"https://api.github.com/users/mollstacks/events{/privacy}","received_events_url":"https://api.github.com/users/mollstacks/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mollstacks/clocksonclocksonclocks","description":"Studying the patterns in clocks. ","fork":false,"url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks","forks_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/forks","keys_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/teams","hooks_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/hooks","issue_events_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/issues/events{/number}","events_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/events","assignees_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/assignees{/user}","branches_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/branches{/branch}","tags_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/tags","blobs_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/git/refs{/sha}","trees_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/statuses/{sha}","languages_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/languages","stargazers_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/stargazers","contributors_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/contributors","subscribers_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/subscribers","subscription_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/subscription","commits_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/commits{/sha}","git_commits_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/git/commits{/sha}","comments_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/comments{/number}","issue_comment_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/issues/comments/{number}","contents_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/contents/{+path}","compare_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/merges","archive_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/downloads","issues_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/issues{/number}","pulls_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/pulls{/number}","milestones_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/milestones{/number}","notifications_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/labels{/name}","releases_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/releases{/id}","created_at":"2015-01-07T18:11:07Z","updated_at":"2015-01-07T19:43:12Z","pushed_at":"2015-01-07T22:11:28Z","git_url":"git://github.com/mollstacks/clocksonclocksonclocks.git","ssh_url":"git@github.com:mollstacks/clocksonclocksonclocks.git","clone_url":"https://github.com/mollstacks/clocksonclocksonclocks.git","svn_url":"https://github.com/mollstacks/clocksonclocksonclocks","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"mollstacks:master","ref":"master","sha":"e884802cef0f5f478199d73753129e4467bf0468","user":{"login":"mollstacks","id":8866147,"avatar_url":"https://avatars.githubusercontent.com/u/8866147?v=3","gravatar_id":"","url":"https://api.github.com/users/mollstacks","html_url":"https://github.com/mollstacks","followers_url":"https://api.github.com/users/mollstacks/followers","following_url":"https://api.github.com/users/mollstacks/following{/other_user}","gists_url":"https://api.github.com/users/mollstacks/gists{/gist_id}","starred_url":"https://api.github.com/users/mollstacks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mollstacks/subscriptions","organizations_url":"https://api.github.com/users/mollstacks/orgs","repos_url":"https://api.github.com/users/mollstacks/repos","events_url":"https://api.github.com/users/mollstacks/events{/privacy}","received_events_url":"https://api.github.com/users/mollstacks/received_events","type":"User","site_admin":false},"repo":{"id":28927001,"name":"clocksonclocksonclocks","full_name":"mollstacks/clocksonclocksonclocks","owner":{"login":"mollstacks","id":8866147,"avatar_url":"https://avatars.githubusercontent.com/u/8866147?v=3","gravatar_id":"","url":"https://api.github.com/users/mollstacks","html_url":"https://github.com/mollstacks","followers_url":"https://api.github.com/users/mollstacks/followers","following_url":"https://api.github.com/users/mollstacks/following{/other_user}","gists_url":"https://api.github.com/users/mollstacks/gists{/gist_id}","starred_url":"https://api.github.com/users/mollstacks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mollstacks/subscriptions","organizations_url":"https://api.github.com/users/mollstacks/orgs","repos_url":"https://api.github.com/users/mollstacks/repos","events_url":"https://api.github.com/users/mollstacks/events{/privacy}","received_events_url":"https://api.github.com/users/mollstacks/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mollstacks/clocksonclocksonclocks","description":"Studying the patterns in clocks. ","fork":false,"url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks","forks_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/forks","keys_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/teams","hooks_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/hooks","issue_events_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/issues/events{/number}","events_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/events","assignees_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/assignees{/user}","branches_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/branches{/branch}","tags_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/tags","blobs_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/git/refs{/sha}","trees_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/statuses/{sha}","languages_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/languages","stargazers_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/stargazers","contributors_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/contributors","subscribers_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/subscribers","subscription_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/subscription","commits_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/commits{/sha}","git_commits_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/git/commits{/sha}","comments_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/comments{/number}","issue_comment_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/issues/comments/{number}","contents_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/contents/{+path}","compare_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/merges","archive_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/downloads","issues_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/issues{/number}","pulls_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/pulls{/number}","milestones_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/milestones{/number}","notifications_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/labels{/name}","releases_url":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/releases{/id}","created_at":"2015-01-07T18:11:07Z","updated_at":"2015-01-07T19:43:12Z","pushed_at":"2015-01-07T22:11:28Z","git_url":"git://github.com/mollstacks/clocksonclocksonclocks.git","ssh_url":"git@github.com:mollstacks/clocksonclocksonclocks.git","clone_url":"https://github.com/mollstacks/clocksonclocksonclocks.git","svn_url":"https://github.com/mollstacks/clocksonclocksonclocks","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/pulls/1"},"html":{"href":"https://github.com/mollstacks/clocksonclocksonclocks/pull/1"},"issue":{"href":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/issues/1"},"comments":{"href":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/mollstacks/clocksonclocksonclocks/statuses/4cb9c96969eac9500aba315630bbebac09861cea"}}}}