{"action":"opened","issue":{"url":"https://api.github.com/repos/HaritzPuerto/DataStructuresInScala/issues/2","labels_url":"https://api.github.com/repos/HaritzPuerto/DataStructuresInScala/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/HaritzPuerto/DataStructuresInScala/issues/2/comments","events_url":"https://api.github.com/repos/HaritzPuerto/DataStructuresInScala/issues/2/events","html_url":"https://github.com/HaritzPuerto/DataStructuresInScala/issues/2","id":89286848,"number":2,"title":"Pattern Matching and case classes","user":{"login":"HaritzPuerto","id":2658728,"avatar_url":"https://avatars.githubusercontent.com/u/2658728?v=3","gravatar_id":"","url":"https://api.github.com/users/HaritzPuerto","html_url":"https://github.com/HaritzPuerto","followers_url":"https://api.github.com/users/HaritzPuerto/followers","following_url":"https://api.github.com/users/HaritzPuerto/following{/other_user}","gists_url":"https://api.github.com/users/HaritzPuerto/gists{/gist_id}","starred_url":"https://api.github.com/users/HaritzPuerto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HaritzPuerto/subscriptions","organizations_url":"https://api.github.com/users/HaritzPuerto/orgs","repos_url":"https://api.github.com/users/HaritzPuerto/repos","events_url":"https://api.github.com/users/HaritzPuerto/events{/privacy}","received_events_url":"https://api.github.com/users/HaritzPuerto/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-18T12:56:28Z","updated_at":"2015-06-18T12:56:28Z","closed_at":null,"body":"```\r\nabstract class WBLHeap[A] {\r\n  def weight() : Int = this match {\r\n    case EmptyHeap => 0\r\n    case Node[A](e, w, l, r) => w\r\n```\r\nThis doesn't work. EmptyHead gives an error. The solution to that error is:\r\n```\r\nabstract class WBLHeap[+A] {\r\n  def weight() : Int = this match {\r\n    case EmptyHeap => 0\r\n    case Node[A](e, w, l, r) => w\r\n```\r\nBut this gives another error in Node[A]... It says that Node doesn't take parameters, so I remove them, but then another error in Node arises. What is more, it tells me that I should use: Node[A](_, _, _, _) wtf is going on?"}}