{"action":"created","comment":{"url":"https://api.github.com/repos/evilsoft/crocks/pulls/comments/103138788","pull_request_review_id":23915118,"id":103138788,"diff_hunk":"@@ -2,12 +2,65 @@\n \n `Pred a`\n \n---\n+The `Pred` crock allows you to reuse the same predicate logic with different kind of inputs, the only think we ask of you is that you let `Pred` know how to get from your expected input to the predicate input.\n+\n+Say you have a predicate function `isOfAge = age => age >= 21`, but you have an input `{name: \"John\", age : 23}`, you could of course do something like `isPersonOfAge = person => isOfAge(person.age)`\n+\n+Or you can use `Pred` and gain a monoidal interface, with the ability to decorate your predicate to work with any kind of input, using the contramap interface.\n+\n+That means that you would have the ability to easily chain your predicates without too much rewrite.\n+\n+Let's say that you also want to require that a person was referred by a friend, you could just concat 2 preds or use another mechanism for conjunction.","path":"docs/crocks/Pred.md","position":13,"original_position":13,"commit_id":"f7c6047e759593813787b89a8d661f5b7bc4c5be","original_commit_id":"f7c6047e759593813787b89a8d661f5b7bc4c5be","user":{"login":"evilsoft","id":3665793,"avatar_url":"https://avatars.githubusercontent.com/u/3665793?v=3","gravatar_id":"","url":"https://api.github.com/users/evilsoft","html_url":"https://github.com/evilsoft","followers_url":"https://api.github.com/users/evilsoft/followers","following_url":"https://api.github.com/users/evilsoft/following{/other_user}","gists_url":"https://api.github.com/users/evilsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/evilsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evilsoft/subscriptions","organizations_url":"https://api.github.com/users/evilsoft/orgs","repos_url":"https://api.github.com/users/evilsoft/repos","events_url":"https://api.github.com/users/evilsoft/events{/privacy}","received_events_url":"https://api.github.com/users/evilsoft/received_events","type":"User","site_admin":false},"body":"> 2 preds\r\n\r\nshould be:\r\n(2) `Pred`s","created_at":"2017-02-27T05:34:48Z","updated_at":"2017-02-27T05:45:07Z","html_url":"https://github.com/evilsoft/crocks/pull/93#discussion_r103138788","pull_request_url":"https://api.github.com/repos/evilsoft/crocks/pulls/93","_links":{"self":{"href":"https://api.github.com/repos/evilsoft/crocks/pulls/comments/103138788"},"html":{"href":"https://github.com/evilsoft/crocks/pull/93#discussion_r103138788"},"pull_request":{"href":"https://api.github.com/repos/evilsoft/crocks/pulls/93"}}},"pull_request":{"url":"https://api.github.com/repos/evilsoft/crocks/pulls/93","id":108035095,"html_url":"https://github.com/evilsoft/crocks/pull/93","diff_url":"https://github.com/evilsoft/crocks/pull/93.diff","patch_url":"https://github.com/evilsoft/crocks/pull/93.patch","issue_url":"https://api.github.com/repos/evilsoft/crocks/issues/93","number":93,"state":"open","locked":false,"title":" Inital draft for Pred docs","user":{"login":"galileopy","id":7267587,"avatar_url":"https://avatars.githubusercontent.com/u/7267587?v=3","gravatar_id":"","url":"https://api.github.com/users/galileopy","html_url":"https://github.com/galileopy","followers_url":"https://api.github.com/users/galileopy/followers","following_url":"https://api.github.com/users/galileopy/following{/other_user}","gists_url":"https://api.github.com/users/galileopy/gists{/gist_id}","starred_url":"https://api.github.com/users/galileopy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/galileopy/subscriptions","organizations_url":"https://api.github.com/users/galileopy/orgs","repos_url":"https://api.github.com/users/galileopy/repos","events_url":"https://api.github.com/users/galileopy/events{/privacy}","received_events_url":"https://api.github.com/users/galileopy/received_events","type":"User","site_admin":false},"body":"Documentation for the Pred crock, with a nice example :)","created_at":"2017-02-27T01:55:50Z","updated_at":"2017-02-27T05:45:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d70fdda7fe2394cbdc1a71dc14ee0d1c30ccfd86","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/evilsoft/crocks/pulls/93/commits","review_comments_url":"https://api.github.com/repos/evilsoft/crocks/pulls/93/comments","review_comment_url":"https://api.github.com/repos/evilsoft/crocks/pulls/comments{/number}","comments_url":"https://api.github.com/repos/evilsoft/crocks/issues/93/comments","statuses_url":"https://api.github.com/repos/evilsoft/crocks/statuses/f7c6047e759593813787b89a8d661f5b7bc4c5be","head":{"label":"galileopy:docs","ref":"docs","sha":"f7c6047e759593813787b89a8d661f5b7bc4c5be","user":{"login":"galileopy","id":7267587,"avatar_url":"https://avatars.githubusercontent.com/u/7267587?v=3","gravatar_id":"","url":"https://api.github.com/users/galileopy","html_url":"https://github.com/galileopy","followers_url":"https://api.github.com/users/galileopy/followers","following_url":"https://api.github.com/users/galileopy/following{/other_user}","gists_url":"https://api.github.com/users/galileopy/gists{/gist_id}","starred_url":"https://api.github.com/users/galileopy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/galileopy/subscriptions","organizations_url":"https://api.github.com/users/galileopy/orgs","repos_url":"https://api.github.com/users/galileopy/repos","events_url":"https://api.github.com/users/galileopy/events{/privacy}","received_events_url":"https://api.github.com/users/galileopy/received_events","type":"User","site_admin":false},"repo":{"id":83256998,"name":"crocks","full_name":"galileopy/crocks","owner":{"login":"galileopy","id":7267587,"avatar_url":"https://avatars.githubusercontent.com/u/7267587?v=3","gravatar_id":"","url":"https://api.github.com/users/galileopy","html_url":"https://github.com/galileopy","followers_url":"https://api.github.com/users/galileopy/followers","following_url":"https://api.github.com/users/galileopy/following{/other_user}","gists_url":"https://api.github.com/users/galileopy/gists{/gist_id}","starred_url":"https://api.github.com/users/galileopy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/galileopy/subscriptions","organizations_url":"https://api.github.com/users/galileopy/orgs","repos_url":"https://api.github.com/users/galileopy/repos","events_url":"https://api.github.com/users/galileopy/events{/privacy}","received_events_url":"https://api.github.com/users/galileopy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/galileopy/crocks","description":"A collection of well known Monadic Containers for your utter enjoyment.","fork":true,"url":"https://api.github.com/repos/galileopy/crocks","forks_url":"https://api.github.com/repos/galileopy/crocks/forks","keys_url":"https://api.github.com/repos/galileopy/crocks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/galileopy/crocks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/galileopy/crocks/teams","hooks_url":"https://api.github.com/repos/galileopy/crocks/hooks","issue_events_url":"https://api.github.com/repos/galileopy/crocks/issues/events{/number}","events_url":"https://api.github.com/repos/galileopy/crocks/events","assignees_url":"https://api.github.com/repos/galileopy/crocks/assignees{/user}","branches_url":"https://api.github.com/repos/galileopy/crocks/branches{/branch}","tags_url":"https://api.github.com/repos/galileopy/crocks/tags","blobs_url":"https://api.github.com/repos/galileopy/crocks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/galileopy/crocks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/galileopy/crocks/git/refs{/sha}","trees_url":"https://api.github.com/repos/galileopy/crocks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/galileopy/crocks/statuses/{sha}","languages_url":"https://api.github.com/repos/galileopy/crocks/languages","stargazers_url":"https://api.github.com/repos/galileopy/crocks/stargazers","contributors_url":"https://api.github.com/repos/galileopy/crocks/contributors","subscribers_url":"https://api.github.com/repos/galileopy/crocks/subscribers","subscription_url":"https://api.github.com/repos/galileopy/crocks/subscription","commits_url":"https://api.github.com/repos/galileopy/crocks/commits{/sha}","git_commits_url":"https://api.github.com/repos/galileopy/crocks/git/commits{/sha}","comments_url":"https://api.github.com/repos/galileopy/crocks/comments{/number}","issue_comment_url":"https://api.github.com/repos/galileopy/crocks/issues/comments{/number}","contents_url":"https://api.github.com/repos/galileopy/crocks/contents/{+path}","compare_url":"https://api.github.com/repos/galileopy/crocks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/galileopy/crocks/merges","archive_url":"https://api.github.com/repos/galileopy/crocks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/galileopy/crocks/downloads","issues_url":"https://api.github.com/repos/galileopy/crocks/issues{/number}","pulls_url":"https://api.github.com/repos/galileopy/crocks/pulls{/number}","milestones_url":"https://api.github.com/repos/galileopy/crocks/milestones{/number}","notifications_url":"https://api.github.com/repos/galileopy/crocks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/galileopy/crocks/labels{/name}","releases_url":"https://api.github.com/repos/galileopy/crocks/releases{/id}","deployments_url":"https://api.github.com/repos/galileopy/crocks/deployments","created_at":"2017-02-27T01:51:00Z","updated_at":"2017-02-27T01:51:02Z","pushed_at":"2017-02-27T03:49:16Z","git_url":"git://github.com/galileopy/crocks.git","ssh_url":"git@github.com:galileopy/crocks.git","clone_url":"https://github.com/galileopy/crocks.git","svn_url":"https://github.com/galileopy/crocks","homepage":null,"size":495,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"evilsoft:docs","ref":"docs","sha":"49e7f2ad6721ae9d94bd1a4ee7459ee9b8436cfa","user":{"login":"evilsoft","id":3665793,"avatar_url":"https://avatars.githubusercontent.com/u/3665793?v=3","gravatar_id":"","url":"https://api.github.com/users/evilsoft","html_url":"https://github.com/evilsoft","followers_url":"https://api.github.com/users/evilsoft/followers","following_url":"https://api.github.com/users/evilsoft/following{/other_user}","gists_url":"https://api.github.com/users/evilsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/evilsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evilsoft/subscriptions","organizations_url":"https://api.github.com/users/evilsoft/orgs","repos_url":"https://api.github.com/users/evilsoft/repos","events_url":"https://api.github.com/users/evilsoft/events{/privacy}","received_events_url":"https://api.github.com/users/evilsoft/received_events","type":"User","site_admin":false},"repo":{"id":62473217,"name":"crocks","full_name":"evilsoft/crocks","owner":{"login":"evilsoft","id":3665793,"avatar_url":"https://avatars.githubusercontent.com/u/3665793?v=3","gravatar_id":"","url":"https://api.github.com/users/evilsoft","html_url":"https://github.com/evilsoft","followers_url":"https://api.github.com/users/evilsoft/followers","following_url":"https://api.github.com/users/evilsoft/following{/other_user}","gists_url":"https://api.github.com/users/evilsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/evilsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evilsoft/subscriptions","organizations_url":"https://api.github.com/users/evilsoft/orgs","repos_url":"https://api.github.com/users/evilsoft/repos","events_url":"https://api.github.com/users/evilsoft/events{/privacy}","received_events_url":"https://api.github.com/users/evilsoft/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/evilsoft/crocks","description":"A collection of well known Monadic Containers for your utter enjoyment.","fork":false,"url":"https://api.github.com/repos/evilsoft/crocks","forks_url":"https://api.github.com/repos/evilsoft/crocks/forks","keys_url":"https://api.github.com/repos/evilsoft/crocks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/evilsoft/crocks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/evilsoft/crocks/teams","hooks_url":"https://api.github.com/repos/evilsoft/crocks/hooks","issue_events_url":"https://api.github.com/repos/evilsoft/crocks/issues/events{/number}","events_url":"https://api.github.com/repos/evilsoft/crocks/events","assignees_url":"https://api.github.com/repos/evilsoft/crocks/assignees{/user}","branches_url":"https://api.github.com/repos/evilsoft/crocks/branches{/branch}","tags_url":"https://api.github.com/repos/evilsoft/crocks/tags","blobs_url":"https://api.github.com/repos/evilsoft/crocks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/evilsoft/crocks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/evilsoft/crocks/git/refs{/sha}","trees_url":"https://api.github.com/repos/evilsoft/crocks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/evilsoft/crocks/statuses/{sha}","languages_url":"https://api.github.com/repos/evilsoft/crocks/languages","stargazers_url":"https://api.github.com/repos/evilsoft/crocks/stargazers","contributors_url":"https://api.github.com/repos/evilsoft/crocks/contributors","subscribers_url":"https://api.github.com/repos/evilsoft/crocks/subscribers","subscription_url":"https://api.github.com/repos/evilsoft/crocks/subscription","commits_url":"https://api.github.com/repos/evilsoft/crocks/commits{/sha}","git_commits_url":"https://api.github.com/repos/evilsoft/crocks/git/commits{/sha}","comments_url":"https://api.github.com/repos/evilsoft/crocks/comments{/number}","issue_comment_url":"https://api.github.com/repos/evilsoft/crocks/issues/comments{/number}","contents_url":"https://api.github.com/repos/evilsoft/crocks/contents/{+path}","compare_url":"https://api.github.com/repos/evilsoft/crocks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/evilsoft/crocks/merges","archive_url":"https://api.github.com/repos/evilsoft/crocks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/evilsoft/crocks/downloads","issues_url":"https://api.github.com/repos/evilsoft/crocks/issues{/number}","pulls_url":"https://api.github.com/repos/evilsoft/crocks/pulls{/number}","milestones_url":"https://api.github.com/repos/evilsoft/crocks/milestones{/number}","notifications_url":"https://api.github.com/repos/evilsoft/crocks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/evilsoft/crocks/labels{/name}","releases_url":"https://api.github.com/repos/evilsoft/crocks/releases{/id}","deployments_url":"https://api.github.com/repos/evilsoft/crocks/deployments","created_at":"2016-07-02T23:13:18Z","updated_at":"2017-02-25T22:46:17Z","pushed_at":"2017-02-27T05:23:29Z","git_url":"git://github.com/evilsoft/crocks.git","ssh_url":"git@github.com:evilsoft/crocks.git","clone_url":"https://github.com/evilsoft/crocks.git","svn_url":"https://github.com/evilsoft/crocks","homepage":null,"size":495,"stargazers_count":32,"watchers_count":32,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":13,"forks":2,"open_issues":13,"watchers":32,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/evilsoft/crocks/pulls/93"},"html":{"href":"https://github.com/evilsoft/crocks/pull/93"},"issue":{"href":"https://api.github.com/repos/evilsoft/crocks/issues/93"},"comments":{"href":"https://api.github.com/repos/evilsoft/crocks/issues/93/comments"},"review_comments":{"href":"https://api.github.com/repos/evilsoft/crocks/pulls/93/comments"},"review_comment":{"href":"https://api.github.com/repos/evilsoft/crocks/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/evilsoft/crocks/pulls/93/commits"},"statuses":{"href":"https://api.github.com/repos/evilsoft/crocks/statuses/f7c6047e759593813787b89a8d661f5b7bc4c5be"}}}}
{"actor":{"display_login":"evilsoft"}}