{"action":"created","issue":{"url":"https://api.github.com/repos/omcljs/om/issues/329","labels_url":"https://api.github.com/repos/omcljs/om/issues/329/labels{/name}","comments_url":"https://api.github.com/repos/omcljs/om/issues/329/comments","events_url":"https://api.github.com/repos/omcljs/om/issues/329/events","html_url":"https://github.com/omcljs/om/issues/329","id":57534189,"number":329,"title":"Multifunctions that despatch on keywords","user":{"login":"bensu","id":5066487,"avatar_url":"https://avatars.githubusercontent.com/u/5066487?v=3","gravatar_id":"","url":"https://api.github.com/users/bensu","html_url":"https://github.com/bensu","followers_url":"https://api.github.com/users/bensu/followers","following_url":"https://api.github.com/users/bensu/following{/other_user}","gists_url":"https://api.github.com/users/bensu/gists{/gist_id}","starred_url":"https://api.github.com/users/bensu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bensu/subscriptions","organizations_url":"https://api.github.com/users/bensu/orgs","repos_url":"https://api.github.com/users/bensu/repos","events_url":"https://api.github.com/users/bensu/events{/privacy}","received_events_url":"https://api.github.com/users/bensu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-12T23:05:35Z","updated_at":"2015-02-12T23:13:12Z","closed_at":null,"body":"I have a minimal working [example](https://github.com/bensu/om-keyword-test) of a potential bug: if I feed to `om.core/build` a mutlimethod that dispatches on a bare keyword *and* an `opts` map, at some point Om tries to call the keyword with 3 arguments and it fails with \"Invalid Argument arity: 4\". I could trace the call that raises the exception to `om.core/getf` [here](https://github.com/omcljs/om/blob/master/src/om/core.cljs#L894). \r\n\r\nThe relevant code:\r\n\r\n```clj\r\n(defmulti greeter :name)\r\n...\r\n(om/build greeter cursor {:fn identity})\r\n```\r\n\r\nOne solution is to check if the function is a keyword before calling it with those arguments. In case you think it's the right solution, [here](https://github.com/bensu/om/compare/debug-defmulti-keyword) is the code. I know you don't take pull requests :)\r\n\r\nHope this helps\r\n"},"comment":{"url":"https://api.github.com/repos/omcljs/om/issues/comments/74174207","html_url":"https://github.com/omcljs/om/issues/329#issuecomment-74174207","issue_url":"https://api.github.com/repos/omcljs/om/issues/329","id":74174207,"user":{"login":"the-kenny","id":31167,"avatar_url":"https://avatars.githubusercontent.com/u/31167?v=3","gravatar_id":"","url":"https://api.github.com/users/the-kenny","html_url":"https://github.com/the-kenny","followers_url":"https://api.github.com/users/the-kenny/followers","following_url":"https://api.github.com/users/the-kenny/following{/other_user}","gists_url":"https://api.github.com/users/the-kenny/gists{/gist_id}","starred_url":"https://api.github.com/users/the-kenny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/the-kenny/subscriptions","organizations_url":"https://api.github.com/users/the-kenny/orgs","repos_url":"https://api.github.com/users/the-kenny/repos","events_url":"https://api.github.com/users/the-kenny/events{/privacy}","received_events_url":"https://api.github.com/users/the-kenny/received_events","type":"User","site_admin":false},"created_at":"2015-02-12T23:13:12Z","updated_at":"2015-02-12T23:13:12Z","body":"Not sure what's the issue here. ```om/build``` clearly states that it takes a three-arg fn. Your ```greeter``` only accepts one. Try ```(defmulti greeter (fn [c owner opts] (:greeter c)))```"}}