{"action":"created","issue":{"url":"https://api.github.com/repos/aengelberg/loco/issues/10","labels_url":"https://api.github.com/repos/aengelberg/loco/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/aengelberg/loco/issues/10/comments","events_url":"https://api.github.com/repos/aengelberg/loco/issues/10/events","html_url":"https://github.com/aengelberg/loco/issues/10","id":74760785,"number":10,"title":"$or works differently than I expected","user":{"login":"Misophistful","id":5363984,"avatar_url":"https://avatars.githubusercontent.com/u/5363984?v=3","gravatar_id":"","url":"https://api.github.com/users/Misophistful","html_url":"https://github.com/Misophistful","followers_url":"https://api.github.com/users/Misophistful/followers","following_url":"https://api.github.com/users/Misophistful/following{/other_user}","gists_url":"https://api.github.com/users/Misophistful/gists{/gist_id}","starred_url":"https://api.github.com/users/Misophistful/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Misophistful/subscriptions","organizations_url":"https://api.github.com/users/Misophistful/orgs","repos_url":"https://api.github.com/users/Misophistful/repos","events_url":"https://api.github.com/users/Misophistful/events{/privacy}","received_events_url":"https://api.github.com/users/Misophistful/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-09T21:18:34Z","updated_at":"2015-05-10T03:17:44Z","closed_at":null,"body":"I've just started playing with `loco`, but I've hit an immediate brick wall where `$or` isn't behaving how I expected it to.\r\n\r\nI'm trying to solve [Project Euler problem 1](https://projecteuler.net/problem=1), which is nice and easy with the `for` macro:\r\n\r\n```clojure\r\n(for [x (range 1 10)\r\n      :when (or (= 0 (mod x 3))\r\n                (= 0 (mod x 5)))]\r\n  x)\r\n\r\n=> (3 5 6 9)\r\n```\r\n\r\nBut my first attempt at a similar approach with `loco` didn't work:\r\n\r\n```cloure\r\n(solutions\r\n  [($in :x 1 9)\r\n   ($or ($= 0 ($mod :x 3))\r\n        ($= 0 ($mod :x 5)))])\r\n\r\n=> ({:x 1} {:x 2} {:x 3} {:x 4} {:x 5} {:x 6} {:x 7} {:x 8} {:x 9})\r\n```\r\n\r\nI'm guessing that I've totally misunderstood how `$or` should be used, so I'd really appreciate a prod in the right direction.\r\n\r\nThanks for your work on this cool project.\r\n\r\nCheers,\r\nJames"},"comment":{"url":"https://api.github.com/repos/aengelberg/loco/issues/comments/100577940","html_url":"https://github.com/aengelberg/loco/issues/10#issuecomment-100577940","issue_url":"https://api.github.com/repos/aengelberg/loco/issues/10","id":100577940,"user":{"login":"aengelberg","id":4122172,"avatar_url":"https://avatars.githubusercontent.com/u/4122172?v=3","gravatar_id":"","url":"https://api.github.com/users/aengelberg","html_url":"https://github.com/aengelberg","followers_url":"https://api.github.com/users/aengelberg/followers","following_url":"https://api.github.com/users/aengelberg/following{/other_user}","gists_url":"https://api.github.com/users/aengelberg/gists{/gist_id}","starred_url":"https://api.github.com/users/aengelberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aengelberg/subscriptions","organizations_url":"https://api.github.com/users/aengelberg/orgs","repos_url":"https://api.github.com/users/aengelberg/repos","events_url":"https://api.github.com/users/aengelberg/events{/privacy}","received_events_url":"https://api.github.com/users/aengelberg/received_events","type":"User","site_admin":false},"created_at":"2015-05-10T03:17:44Z","updated_at":"2015-05-10T03:17:44Z","body":"Don't worry, you don't have a misunderstanding of how loco works... It's either a bug with $or, $mod, or $=, or there's something quirky about the Choco API that I missed from the Java docs.\r\n\r\nI'll get back to you on this as soon as I get the chance to investigate further. Thanks for finding this issue."}}