{"action":"created","issue":{"url":"https://api.github.com/repos/LoyolaChicagoBooks/introcs-scala-examples/issues/27","labels_url":"https://api.github.com/repos/LoyolaChicagoBooks/introcs-scala-examples/issues/27/labels{/name}","comments_url":"https://api.github.com/repos/LoyolaChicagoBooks/introcs-scala-examples/issues/27/comments","events_url":"https://api.github.com/repos/LoyolaChicagoBooks/introcs-scala-examples/issues/27/events","html_url":"https://github.com/LoyolaChicagoBooks/introcs-scala-examples/issues/27","id":62259088,"number":27,"title":"Can't Euler's version of gcd be tail-recursive?","user":{"login":"klaeufer","id":625947,"avatar_url":"https://avatars.githubusercontent.com/u/625947?v=3","gravatar_id":"","url":"https://api.github.com/users/klaeufer","html_url":"https://github.com/klaeufer","followers_url":"https://api.github.com/users/klaeufer/followers","following_url":"https://api.github.com/users/klaeufer/following{/other_user}","gists_url":"https://api.github.com/users/klaeufer/gists{/gist_id}","starred_url":"https://api.github.com/users/klaeufer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klaeufer/subscriptions","organizations_url":"https://api.github.com/users/klaeufer/orgs","repos_url":"https://api.github.com/users/klaeufer/repos","events_url":"https://api.github.com/users/klaeufer/events{/privacy}","received_events_url":"https://api.github.com/users/klaeufer/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/LoyolaChicagoBooks/introcs-scala-examples/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":{"login":"gkthiruvathukal","id":651504,"avatar_url":"https://avatars.githubusercontent.com/u/651504?v=3","gravatar_id":"","url":"https://api.github.com/users/gkthiruvathukal","html_url":"https://github.com/gkthiruvathukal","followers_url":"https://api.github.com/users/gkthiruvathukal/followers","following_url":"https://api.github.com/users/gkthiruvathukal/following{/other_user}","gists_url":"https://api.github.com/users/gkthiruvathukal/gists{/gist_id}","starred_url":"https://api.github.com/users/gkthiruvathukal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gkthiruvathukal/subscriptions","organizations_url":"https://api.github.com/users/gkthiruvathukal/orgs","repos_url":"https://api.github.com/users/gkthiruvathukal/repos","events_url":"https://api.github.com/users/gkthiruvathukal/events{/privacy}","received_events_url":"https://api.github.com/users/gkthiruvathukal/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2015-03-17T02:14:31Z","updated_at":"2015-03-17T02:24:46Z","closed_at":null,"body":"https://github.com/LoyolaChicagoBooks/introcs-scala-examples/blob/master/gcd/gcd.scala#L5\r\n\r\nThere is a more general tail-recursive version here, as well as a simpler one for positive arguments:\r\n\r\nhttp://en.wikipedia.org/wiki/Greatest_common_divisor#Using_Euclid.27s_algorithm"},"comment":{"url":"https://api.github.com/repos/LoyolaChicagoBooks/introcs-scala-examples/issues/comments/82047990","html_url":"https://github.com/LoyolaChicagoBooks/introcs-scala-examples/issues/27#issuecomment-82047990","issue_url":"https://api.github.com/repos/LoyolaChicagoBooks/introcs-scala-examples/issues/27","id":82047990,"user":{"login":"gkthiruvathukal","id":651504,"avatar_url":"https://avatars.githubusercontent.com/u/651504?v=3","gravatar_id":"","url":"https://api.github.com/users/gkthiruvathukal","html_url":"https://github.com/gkthiruvathukal","followers_url":"https://api.github.com/users/gkthiruvathukal/followers","following_url":"https://api.github.com/users/gkthiruvathukal/following{/other_user}","gists_url":"https://api.github.com/users/gkthiruvathukal/gists{/gist_id}","starred_url":"https://api.github.com/users/gkthiruvathukal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gkthiruvathukal/subscriptions","organizations_url":"https://api.github.com/users/gkthiruvathukal/orgs","repos_url":"https://api.github.com/users/gkthiruvathukal/repos","events_url":"https://api.github.com/users/gkthiruvathukal/events{/privacy}","received_events_url":"https://api.github.com/users/gkthiruvathukal/received_events","type":"User","site_admin":false},"created_at":"2015-03-17T02:24:45Z","updated_at":"2015-03-17T02:24:45Z","body":"Thanks for suggesting this. The original C# version was designed only for positive (well, non-negative, because you do have a base case at x=0) inputs. Technically, this might be more true to Euclid's original algorithm."}}