{"action":"closed","issue":{"url":"https://api.github.com/repos/alexarchambault/jupyter-scala/issues/2","labels_url":"https://api.github.com/repos/alexarchambault/jupyter-scala/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/alexarchambault/jupyter-scala/issues/2/comments","events_url":"https://api.github.com/repos/alexarchambault/jupyter-scala/issues/2/events","html_url":"https://github.com/alexarchambault/jupyter-scala/issues/2","id":69452283,"number":2,"title":"Wrong answers for flatMap","user":{"login":"cliburn","id":518247,"avatar_url":"https://avatars.githubusercontent.com/u/518247?v=3","gravatar_id":"","url":"https://api.github.com/users/cliburn","html_url":"https://github.com/cliburn","followers_url":"https://api.github.com/users/cliburn/followers","following_url":"https://api.github.com/users/cliburn/following{/other_user}","gists_url":"https://api.github.com/users/cliburn/gists{/gist_id}","starred_url":"https://api.github.com/users/cliburn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cliburn/subscriptions","organizations_url":"https://api.github.com/users/cliburn/orgs","repos_url":"https://api.github.com/users/cliburn/repos","events_url":"https://api.github.com/users/cliburn/events{/privacy}","received_events_url":"https://api.github.com/users/cliburn/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-04-19T18:38:41Z","updated_at":"2015-05-15T16:28:48Z","closed_at":"2015-05-15T16:28:48Z","body":"```scala\r\nval xs = List(1,2,3)\r\nxs flatMap {x => List(x, x*2)}\r\n```\r\n\r\ngives \r\n```scala\r\nList(1, 2, 3)\r\n```\r\n\r\nbut\r\n```scala\r\nxs map {x =>List(x, x*2)} flatten\r\n```\r\n\r\ngives\r\n```scala\r\nList(1, 2, 2, 4, 3, 6)\r\n```"}}