{"action":"created","issue":{"url":"https://api.github.com/repos/rwobben/paytime/issues/33","labels_url":"https://api.github.com/repos/rwobben/paytime/issues/33/labels{/name}","comments_url":"https://api.github.com/repos/rwobben/paytime/issues/33/comments","events_url":"https://api.github.com/repos/rwobben/paytime/issues/33/events","html_url":"https://github.com/rwobben/paytime/pull/33","id":127511060,"number":33,"title":"gave all the account functions a new place","user":{"login":"rwobben","id":16528407,"avatar_url":"https://avatars.githubusercontent.com/u/16528407?v=3","gravatar_id":"","url":"https://api.github.com/users/rwobben","html_url":"https://github.com/rwobben","followers_url":"https://api.github.com/users/rwobben/followers","following_url":"https://api.github.com/users/rwobben/following{/other_user}","gists_url":"https://api.github.com/users/rwobben/gists{/gist_id}","starred_url":"https://api.github.com/users/rwobben/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rwobben/subscriptions","organizations_url":"https://api.github.com/users/rwobben/orgs","repos_url":"https://api.github.com/users/rwobben/repos","events_url":"https://api.github.com/users/rwobben/events{/privacy}","received_events_url":"https://api.github.com/users/rwobben/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":150,"created_at":"2016-01-19T18:42:34Z","updated_at":"2016-01-24T11:31:31Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rwobben/paytime/pulls/33","html_url":"https://github.com/rwobben/paytime/pull/33","diff_url":"https://github.com/rwobben/paytime/pull/33.diff","patch_url":"https://github.com/rwobben/paytime/pull/33.patch"},"body":"Every function is on the new place except these : \r\n\r\n    type PrintItem = (Name,Amount) \r\n    type PrintList = [PrintItem]\r\n   \r\n    printTable :: String ->  PrintList -> Box\r\n    printTable title bank =\r\n        let\r\n            heading = alignHoriz center1 40 (text title)\r\n            tablehead = leftright \"Account\" \"Amount\"\r\n            contents = vcat left (map accountRow bank)\r\n        in\r\n            heading /+/ tablehead /+/ contents\r\n\r\n    accountRow :: PrintItem  -> Box\r\n    accountRow (name, amount) =\r\n        leftright name (show amount)\r\n\r\n    leftright :: String -> String -> Box\r\n    leftright lft rght =\r\n        let\r\n            leftBox = alignHoriz left 27 (text lft)\r\n            rightBox = alignHoriz right 12 (text rght)\r\n        in\r\n            leftBox <+> rightBox\r\n  \r\nthis function is now called like this : \r\n\r\n     printBox (printTable \"Added Accounts\" [(newName, newBal)])\r\n\r\nYou were not happy because we use data-structures to pass things around.\r\nYou said it's better to use functions. "},"comment":{"url":"https://api.github.com/repos/rwobben/paytime/issues/comments/174285433","html_url":"https://github.com/rwobben/paytime/pull/33#issuecomment-174285433","issue_url":"https://api.github.com/repos/rwobben/paytime/issues/33","id":174285433,"user":{"login":"GetContented","id":5661934,"avatar_url":"https://avatars.githubusercontent.com/u/5661934?v=3","gravatar_id":"","url":"https://api.github.com/users/GetContented","html_url":"https://github.com/GetContented","followers_url":"https://api.github.com/users/GetContented/followers","following_url":"https://api.github.com/users/GetContented/following{/other_user}","gists_url":"https://api.github.com/users/GetContented/gists{/gist_id}","starred_url":"https://api.github.com/users/GetContented/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GetContented/subscriptions","organizations_url":"https://api.github.com/users/GetContented/orgs","repos_url":"https://api.github.com/users/GetContented/repos","events_url":"https://api.github.com/users/GetContented/events{/privacy}","received_events_url":"https://api.github.com/users/GetContented/received_events","type":"User","site_admin":false},"created_at":"2016-01-24T11:31:31Z","updated_at":"2016-01-24T11:31:31Z","body":"Well you may as well get the last transaction from the account after adding it if you like... if that works... it's fine. It's not ideal, but it's fine for this."}}