{"action":"closed","issue":{"url":"https://api.github.com/repos/gitslaton/ProgLangAssignments/issues/9","labels_url":"https://api.github.com/repos/gitslaton/ProgLangAssignments/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/gitslaton/ProgLangAssignments/issues/9/comments","events_url":"https://api.github.com/repos/gitslaton/ProgLangAssignments/issues/9/events","html_url":"https://github.com/gitslaton/ProgLangAssignments/issues/9","id":128991132,"number":9,"title":"write function inPairs","user":{"login":"gitslaton","id":10524611,"avatar_url":"https://avatars.githubusercontent.com/u/10524611?v=3","gravatar_id":"","url":"https://api.github.com/users/gitslaton","html_url":"https://github.com/gitslaton","followers_url":"https://api.github.com/users/gitslaton/followers","following_url":"https://api.github.com/users/gitslaton/following{/other_user}","gists_url":"https://api.github.com/users/gitslaton/gists{/gist_id}","starred_url":"https://api.github.com/users/gitslaton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gitslaton/subscriptions","organizations_url":"https://api.github.com/users/gitslaton/orgs","repos_url":"https://api.github.com/users/gitslaton/repos","events_url":"https://api.github.com/users/gitslaton/events{/privacy}","received_events_url":"https://api.github.com/users/gitslaton/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-01-27T00:56:52Z","updated_at":"2016-01-27T00:59:45Z","closed_at":"2016-01-27T00:59:45Z","body":"(*\r\n   Write a function `inPairs` that takes a list of integers and returns a list\r\n   of pairs of integers as follows: Starting from the head of the list, it puts\r\n   together the next two integers in a pair and keeps going. If the list has an\r\n   odd number of elements then the last element is left out. Example:\r\n   inPairs [1; 2; 3; 4; 5] = [(1, 2); (3, 4)]\r\n   It should have type: int list -> (int * int) list\r\n*)\r\n\r\nnotes:\r\nfirst check if list is empty then []\r\nelse use a match to bind hd of list to hd and then use another match to get the second and bind to snd\r\nadd to new list and recursive call to inPairs"}}