{"action":"opened","issue":{"url":"https://api.github.com/repos/paldepind/union-type/issues/24","labels_url":"https://api.github.com/repos/paldepind/union-type/issues/24/labels{/name}","comments_url":"https://api.github.com/repos/paldepind/union-type/issues/24/comments","events_url":"https://api.github.com/repos/paldepind/union-type/issues/24/events","html_url":"https://github.com/paldepind/union-type/issues/24","id":124581233,"number":24,"title":"caseOn with _ has variable argument count","user":{"login":"kurtharriger","id":112603,"avatar_url":"https://avatars.githubusercontent.com/u/112603?v=3","gravatar_id":"","url":"https://api.github.com/users/kurtharriger","html_url":"https://github.com/kurtharriger","followers_url":"https://api.github.com/users/kurtharriger/followers","following_url":"https://api.github.com/users/kurtharriger/following{/other_user}","gists_url":"https://api.github.com/users/kurtharriger/gists{/gist_id}","starred_url":"https://api.github.com/users/kurtharriger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kurtharriger/subscriptions","organizations_url":"https://api.github.com/users/kurtharriger/orgs","repos_url":"https://api.github.com/users/kurtharriger/repos","events_url":"https://api.github.com/users/kurtharriger/events{/privacy}","received_events_url":"https://api.github.com/users/kurtharriger/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-01-02T08:33:20Z","updated_at":"2016-01-02T08:33:20Z","closed_at":null,"body":"In the caseOn example none of the values had any arguments, so player is always the first argument.  However, if you had an additional type that took an argument then player may or may not be the first argument.\r\nI believe this is caused by action.concat[arg] here: \r\nhttps://github.com/paldepind/union-type/blob/master/union-type.js#L55\r\n\r\nPerhaps it would make sense for _ to just skip the concat when matching on _? \r\nPerhaps it could even pass the raw action array as first argument or as context, but I'm not sure if it would be useful when you don't otherwise know what it is. "}}