{"action":"created","comment":{"url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/pulls/comments/103808729","pull_request_review_id":24610440,"id":103808729,"diff_hunk":"@@ -0,0 +1,38 @@\n+(ns info.lotharschulz.armstrong_numbers.armstrong_numbers\n+  (:import [java.Math]))\n+\n+(defn get-number-of-digits [^Integer n]\n+  {:pre [(not (nil? n)) (integer? n)]}\n+  \"Returns the :getNumberOfDigits of n if n is an integer and greater than -1\"\n+  (if (zero? n)\n+    1\n+    (if (pos? n )\n+      (+ (int (Math/log10 n )) 1)\n+      nil)))\n+\n+(defn get-digits [^Integer n]\n+  {:pre [(not (nil? n)) (integer? n)]}\n+  \"return number of digits of given int n\"\n+    (if (zero? n)\n+      [0]\n+      (if (pos? n)\n+        (into [] (map #(Character/getNumericValue %) (str n)))\n+        [])))\n+\n+(defn is-armstrong-number [^Integer n]\n+  {:pre [(not (nil? n)) (integer? n)]}\n+  \"Returns true if the given number bigger than -1 is an armstrong number\"\n+  (if (zero? n)\n+    false\n+    (if (pos? n)\n+      (= n (reduce + (map #(int (Math/pow % (get-number-of-digits n))) (get-digits n))))\n+      false)))\n+\n+(defn generate-armstrong-numbers [^Integer from, ^Integer to]\n+  {:pre [(not (nil? from)) (integer? from) (pos? from) (not (nil? to)) (integer? to) (pos? to) ]}\n+  \"generate armstrong numbers for ranges of ints greater than 0 defined by from and to\"\n+  (if (< from to)\n+    (into [] (for [x (range from to)\n+                   :when (true? (is-armstrong-number x))]","path":"clojure/src/info/lotharschulz/armstrong_numbers/armstrong_numbers.clj","position":36,"original_position":36,"commit_id":"bdcdd2bdf8dfb9b40c989afeef467f4de8753b67","original_commit_id":"bdcdd2bdf8dfb9b40c989afeef467f4de8753b67","user":{"login":"dryewo","id":3134153,"avatar_url":"https://avatars3.githubusercontent.com/u/3134153?v=3","gravatar_id":"","url":"https://api.github.com/users/dryewo","html_url":"https://github.com/dryewo","followers_url":"https://api.github.com/users/dryewo/followers","following_url":"https://api.github.com/users/dryewo/following{/other_user}","gists_url":"https://api.github.com/users/dryewo/gists{/gist_id}","starred_url":"https://api.github.com/users/dryewo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dryewo/subscriptions","organizations_url":"https://api.github.com/users/dryewo/orgs","repos_url":"https://api.github.com/users/dryewo/repos","events_url":"https://api.github.com/users/dryewo/events{/privacy}","received_events_url":"https://api.github.com/users/dryewo/received_events","type":"User","site_admin":false},"body":"and actually\r\n`(filter is-armstrong-number (range from to))`\r\nwill also work\r\nor even\r\n`(filterv is-armstrong-number (range from to))`\r\nif you specifically want a vector, not just a seq","created_at":"2017-03-01T22:41:13Z","updated_at":"2017-03-01T22:41:13Z","html_url":"https://github.com/lotharschulz/armstrongNumbers/pull/1#discussion_r103808729","pull_request_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/lotharschulz/armstrongNumbers/pulls/comments/103808729"},"html":{"href":"https://github.com/lotharschulz/armstrongNumbers/pull/1#discussion_r103808729"},"pull_request":{"href":"https://api.github.com/repos/lotharschulz/armstrongNumbers/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/pulls/1","id":108312559,"html_url":"https://github.com/lotharschulz/armstrongNumbers/pull/1","diff_url":"https://github.com/lotharschulz/armstrongNumbers/pull/1.diff","patch_url":"https://github.com/lotharschulz/armstrongNumbers/pull/1.patch","issue_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/issues/1","number":1,"state":"open","locked":false,"title":"clojure armstrong number implementation","user":{"login":"lotharschulz","id":1148268,"avatar_url":"https://avatars2.githubusercontent.com/u/1148268?v=3","gravatar_id":"","url":"https://api.github.com/users/lotharschulz","html_url":"https://github.com/lotharschulz","followers_url":"https://api.github.com/users/lotharschulz/followers","following_url":"https://api.github.com/users/lotharschulz/following{/other_user}","gists_url":"https://api.github.com/users/lotharschulz/gists{/gist_id}","starred_url":"https://api.github.com/users/lotharschulz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lotharschulz/subscriptions","organizations_url":"https://api.github.com/users/lotharschulz/orgs","repos_url":"https://api.github.com/users/lotharschulz/repos","events_url":"https://api.github.com/users/lotharschulz/events{/privacy}","received_events_url":"https://api.github.com/users/lotharschulz/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-02-28T11:39:46Z","updated_at":"2017-03-01T22:41:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"25f8de2aa3ca01db74f321400f6f4b5c19a51e57","assignee":{"login":"lotharschulz","id":1148268,"avatar_url":"https://avatars2.githubusercontent.com/u/1148268?v=3","gravatar_id":"","url":"https://api.github.com/users/lotharschulz","html_url":"https://github.com/lotharschulz","followers_url":"https://api.github.com/users/lotharschulz/followers","following_url":"https://api.github.com/users/lotharschulz/following{/other_user}","gists_url":"https://api.github.com/users/lotharschulz/gists{/gist_id}","starred_url":"https://api.github.com/users/lotharschulz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lotharschulz/subscriptions","organizations_url":"https://api.github.com/users/lotharschulz/orgs","repos_url":"https://api.github.com/users/lotharschulz/repos","events_url":"https://api.github.com/users/lotharschulz/events{/privacy}","received_events_url":"https://api.github.com/users/lotharschulz/received_events","type":"User","site_admin":false},"assignees":[{"login":"lotharschulz","id":1148268,"avatar_url":"https://avatars2.githubusercontent.com/u/1148268?v=3","gravatar_id":"","url":"https://api.github.com/users/lotharschulz","html_url":"https://github.com/lotharschulz","followers_url":"https://api.github.com/users/lotharschulz/followers","following_url":"https://api.github.com/users/lotharschulz/following{/other_user}","gists_url":"https://api.github.com/users/lotharschulz/gists{/gist_id}","starred_url":"https://api.github.com/users/lotharschulz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lotharschulz/subscriptions","organizations_url":"https://api.github.com/users/lotharschulz/orgs","repos_url":"https://api.github.com/users/lotharschulz/repos","events_url":"https://api.github.com/users/lotharschulz/events{/privacy}","received_events_url":"https://api.github.com/users/lotharschulz/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/pulls/1/commits","review_comments_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/pulls/1/comments","review_comment_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/issues/1/comments","statuses_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/statuses/bdcdd2bdf8dfb9b40c989afeef467f4de8753b67","head":{"label":"lotharschulz:clj","ref":"clj","sha":"bdcdd2bdf8dfb9b40c989afeef467f4de8753b67","user":{"login":"lotharschulz","id":1148268,"avatar_url":"https://avatars2.githubusercontent.com/u/1148268?v=3","gravatar_id":"","url":"https://api.github.com/users/lotharschulz","html_url":"https://github.com/lotharschulz","followers_url":"https://api.github.com/users/lotharschulz/followers","following_url":"https://api.github.com/users/lotharschulz/following{/other_user}","gists_url":"https://api.github.com/users/lotharschulz/gists{/gist_id}","starred_url":"https://api.github.com/users/lotharschulz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lotharschulz/subscriptions","organizations_url":"https://api.github.com/users/lotharschulz/orgs","repos_url":"https://api.github.com/users/lotharschulz/repos","events_url":"https://api.github.com/users/lotharschulz/events{/privacy}","received_events_url":"https://api.github.com/users/lotharschulz/received_events","type":"User","site_admin":false},"repo":{"id":58968985,"name":"armstrongNumbers","full_name":"lotharschulz/armstrongNumbers","owner":{"login":"lotharschulz","id":1148268,"avatar_url":"https://avatars2.githubusercontent.com/u/1148268?v=3","gravatar_id":"","url":"https://api.github.com/users/lotharschulz","html_url":"https://github.com/lotharschulz","followers_url":"https://api.github.com/users/lotharschulz/followers","following_url":"https://api.github.com/users/lotharschulz/following{/other_user}","gists_url":"https://api.github.com/users/lotharschulz/gists{/gist_id}","starred_url":"https://api.github.com/users/lotharschulz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lotharschulz/subscriptions","organizations_url":"https://api.github.com/users/lotharschulz/orgs","repos_url":"https://api.github.com/users/lotharschulz/repos","events_url":"https://api.github.com/users/lotharschulz/events{/privacy}","received_events_url":"https://api.github.com/users/lotharschulz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lotharschulz/armstrongNumbers","description":"armstrongNumbers","fork":false,"url":"https://api.github.com/repos/lotharschulz/armstrongNumbers","forks_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/forks","keys_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/teams","hooks_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/hooks","issue_events_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/issues/events{/number}","events_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/events","assignees_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/assignees{/user}","branches_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/branches{/branch}","tags_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/tags","blobs_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/git/refs{/sha}","trees_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/statuses/{sha}","languages_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/languages","stargazers_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/stargazers","contributors_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/contributors","subscribers_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/subscribers","subscription_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/subscription","commits_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/commits{/sha}","git_commits_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/git/commits{/sha}","comments_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/comments{/number}","issue_comment_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/issues/comments{/number}","contents_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/contents/{+path}","compare_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/merges","archive_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/downloads","issues_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/issues{/number}","pulls_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/pulls{/number}","milestones_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/milestones{/number}","notifications_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/labels{/name}","releases_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/releases{/id}","deployments_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/deployments","created_at":"2016-05-16T21:26:53Z","updated_at":"2016-05-16T21:27:17Z","pushed_at":"2017-03-01T22:28:46Z","git_url":"git://github.com/lotharschulz/armstrongNumbers.git","ssh_url":"git@github.com:lotharschulz/armstrongNumbers.git","clone_url":"https://github.com/lotharschulz/armstrongNumbers.git","svn_url":"https://github.com/lotharschulz/armstrongNumbers","homepage":null,"size":54,"stargazers_count":0,"watchers_count":0,"language":"Java","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":"lotharschulz:master","ref":"master","sha":"7ff282da5b65bce190b4614831061008817b912c","user":{"login":"lotharschulz","id":1148268,"avatar_url":"https://avatars2.githubusercontent.com/u/1148268?v=3","gravatar_id":"","url":"https://api.github.com/users/lotharschulz","html_url":"https://github.com/lotharschulz","followers_url":"https://api.github.com/users/lotharschulz/followers","following_url":"https://api.github.com/users/lotharschulz/following{/other_user}","gists_url":"https://api.github.com/users/lotharschulz/gists{/gist_id}","starred_url":"https://api.github.com/users/lotharschulz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lotharschulz/subscriptions","organizations_url":"https://api.github.com/users/lotharschulz/orgs","repos_url":"https://api.github.com/users/lotharschulz/repos","events_url":"https://api.github.com/users/lotharschulz/events{/privacy}","received_events_url":"https://api.github.com/users/lotharschulz/received_events","type":"User","site_admin":false},"repo":{"id":58968985,"name":"armstrongNumbers","full_name":"lotharschulz/armstrongNumbers","owner":{"login":"lotharschulz","id":1148268,"avatar_url":"https://avatars2.githubusercontent.com/u/1148268?v=3","gravatar_id":"","url":"https://api.github.com/users/lotharschulz","html_url":"https://github.com/lotharschulz","followers_url":"https://api.github.com/users/lotharschulz/followers","following_url":"https://api.github.com/users/lotharschulz/following{/other_user}","gists_url":"https://api.github.com/users/lotharschulz/gists{/gist_id}","starred_url":"https://api.github.com/users/lotharschulz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lotharschulz/subscriptions","organizations_url":"https://api.github.com/users/lotharschulz/orgs","repos_url":"https://api.github.com/users/lotharschulz/repos","events_url":"https://api.github.com/users/lotharschulz/events{/privacy}","received_events_url":"https://api.github.com/users/lotharschulz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lotharschulz/armstrongNumbers","description":"armstrongNumbers","fork":false,"url":"https://api.github.com/repos/lotharschulz/armstrongNumbers","forks_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/forks","keys_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/teams","hooks_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/hooks","issue_events_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/issues/events{/number}","events_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/events","assignees_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/assignees{/user}","branches_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/branches{/branch}","tags_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/tags","blobs_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/git/refs{/sha}","trees_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/statuses/{sha}","languages_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/languages","stargazers_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/stargazers","contributors_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/contributors","subscribers_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/subscribers","subscription_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/subscription","commits_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/commits{/sha}","git_commits_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/git/commits{/sha}","comments_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/comments{/number}","issue_comment_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/issues/comments{/number}","contents_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/contents/{+path}","compare_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/merges","archive_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/downloads","issues_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/issues{/number}","pulls_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/pulls{/number}","milestones_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/milestones{/number}","notifications_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/labels{/name}","releases_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/releases{/id}","deployments_url":"https://api.github.com/repos/lotharschulz/armstrongNumbers/deployments","created_at":"2016-05-16T21:26:53Z","updated_at":"2016-05-16T21:27:17Z","pushed_at":"2017-03-01T22:28:46Z","git_url":"git://github.com/lotharschulz/armstrongNumbers.git","ssh_url":"git@github.com:lotharschulz/armstrongNumbers.git","clone_url":"https://github.com/lotharschulz/armstrongNumbers.git","svn_url":"https://github.com/lotharschulz/armstrongNumbers","homepage":null,"size":54,"stargazers_count":0,"watchers_count":0,"language":"Java","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/lotharschulz/armstrongNumbers/pulls/1"},"html":{"href":"https://github.com/lotharschulz/armstrongNumbers/pull/1"},"issue":{"href":"https://api.github.com/repos/lotharschulz/armstrongNumbers/issues/1"},"comments":{"href":"https://api.github.com/repos/lotharschulz/armstrongNumbers/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/lotharschulz/armstrongNumbers/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/lotharschulz/armstrongNumbers/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lotharschulz/armstrongNumbers/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/lotharschulz/armstrongNumbers/statuses/bdcdd2bdf8dfb9b40c989afeef467f4de8753b67"}}}}
{"actor":{"display_login":"dryewo"}}