{"action":"created","issue":{"url":"https://api.github.com/repos/lstrojny/functional-php/issues/101","repository_url":"https://api.github.com/repos/lstrojny/functional-php","labels_url":"https://api.github.com/repos/lstrojny/functional-php/issues/101/labels{/name}","comments_url":"https://api.github.com/repos/lstrojny/functional-php/issues/101/comments","events_url":"https://api.github.com/repos/lstrojny/functional-php/issues/101/events","html_url":"https://github.com/lstrojny/functional-php/issues/101","id":170596391,"number":101,"title":"[RFC] provide a `not` function","user":{"login":"docteurklein","id":109846,"avatar_url":"https://avatars.githubusercontent.com/u/109846?v=3","gravatar_id":"","url":"https://api.github.com/users/docteurklein","html_url":"https://github.com/docteurklein","followers_url":"https://api.github.com/users/docteurklein/followers","following_url":"https://api.github.com/users/docteurklein/following{/other_user}","gists_url":"https://api.github.com/users/docteurklein/gists{/gist_id}","starred_url":"https://api.github.com/users/docteurklein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docteurklein/subscriptions","organizations_url":"https://api.github.com/users/docteurklein/orgs","repos_url":"https://api.github.com/users/docteurklein/repos","events_url":"https://api.github.com/users/docteurklein/events{/privacy}","received_events_url":"https://api.github.com/users/docteurklein/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-11T08:43:30Z","updated_at":"2016-08-11T09:30:13Z","closed_at":null,"body":"Is it me or one currently can't invert a boolean-returning function ?\r\n\r\nI'd like a `not` function looking like:\r\n\r\n```php\r\nnamespace Functional;\r\n\r\nfunction not(callable $callback) {\r\n    return function($value) use ($callback) {\r\n        return !$callback($value);\r\n    };\r\n}\r\n```\r\n\r\nsee https://3v4l.org/G3vtd for a working impl.\r\n\r\nDo you think it's a good idea?\r\nIf yes, I can try to make a PR.\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/lstrojny/functional-php/issues/comments/239113513","html_url":"https://github.com/lstrojny/functional-php/issues/101#issuecomment-239113513","issue_url":"https://api.github.com/repos/lstrojny/functional-php/issues/101","id":239113513,"user":{"login":"lstrojny","id":79707,"avatar_url":"https://avatars.githubusercontent.com/u/79707?v=3","gravatar_id":"","url":"https://api.github.com/users/lstrojny","html_url":"https://github.com/lstrojny","followers_url":"https://api.github.com/users/lstrojny/followers","following_url":"https://api.github.com/users/lstrojny/following{/other_user}","gists_url":"https://api.github.com/users/lstrojny/gists{/gist_id}","starred_url":"https://api.github.com/users/lstrojny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lstrojny/subscriptions","organizations_url":"https://api.github.com/users/lstrojny/orgs","repos_url":"https://api.github.com/users/lstrojny/repos","events_url":"https://api.github.com/users/lstrojny/events{/privacy}","received_events_url":"https://api.github.com/users/lstrojny/received_events","type":"User","site_admin":false},"created_at":"2016-08-11T09:30:13Z","updated_at":"2016-08-11T09:30:13Z","body":"I like it. But congratulations, you are traveling uncharted territory: operator functions. I can think of more: eq(), neq(), etc. So that one can write `filter($list, and(neq('foo'), neq('bar'))` and so on. Interested on working on the whole topic?"}}
{"actor":{"display_login":"lstrojny"}}