{"action":"created","issue":{"url":"https://api.github.com/repos/apache/incubator-groovy/issues/174","labels_url":"https://api.github.com/repos/apache/incubator-groovy/issues/174/labels{/name}","comments_url":"https://api.github.com/repos/apache/incubator-groovy/issues/174/comments","events_url":"https://api.github.com/repos/apache/incubator-groovy/issues/174/events","html_url":"https://github.com/apache/incubator-groovy/pull/174","id":114493314,"number":174,"title":"add `doto`: same as `with`, but returns the incoming object","user":{"login":"christoph-frick","id":1788100,"avatar_url":"https://avatars.githubusercontent.com/u/1788100?v=3","gravatar_id":"","url":"https://api.github.com/users/christoph-frick","html_url":"https://github.com/christoph-frick","followers_url":"https://api.github.com/users/christoph-frick/followers","following_url":"https://api.github.com/users/christoph-frick/following{/other_user}","gists_url":"https://api.github.com/users/christoph-frick/gists{/gist_id}","starred_url":"https://api.github.com/users/christoph-frick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/christoph-frick/subscriptions","organizations_url":"https://api.github.com/users/christoph-frick/orgs","repos_url":"https://api.github.com/users/christoph-frick/repos","events_url":"https://api.github.com/users/christoph-frick/events{/privacy}","received_events_url":"https://api.github.com/users/christoph-frick/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-11-01T21:09:46Z","updated_at":"2015-11-11T04:30:02Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/incubator-groovy/pulls/174","html_url":"https://github.com/apache/incubator-groovy/pull/174","diff_url":"https://github.com/apache/incubator-groovy/pull/174.diff","patch_url":"https://github.com/apache/incubator-groovy/pull/174.patch"},"body":"My usecase for `with` is >80% to (ab)use it as some sort of builder.  Since I end up putting close to always `(return) it` at the end of my closure: `doto` is a slight variation of `with`, that just returns the incoming object.  [`doto` is a loanword from clojure](http://clojuredocs.org/clojure.core/doto), where it does the same and I could not find a naming scheme for groovy, that would not involve renaming `with` (which is impossible)."},"comment":{"url":"https://api.github.com/repos/apache/incubator-groovy/issues/comments/155657910","html_url":"https://github.com/apache/incubator-groovy/pull/174#issuecomment-155657910","issue_url":"https://api.github.com/repos/apache/incubator-groovy/issues/174","id":155657910,"user":{"login":"shils","id":2948884,"avatar_url":"https://avatars.githubusercontent.com/u/2948884?v=3","gravatar_id":"","url":"https://api.github.com/users/shils","html_url":"https://github.com/shils","followers_url":"https://api.github.com/users/shils/followers","following_url":"https://api.github.com/users/shils/following{/other_user}","gists_url":"https://api.github.com/users/shils/gists{/gist_id}","starred_url":"https://api.github.com/users/shils/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shils/subscriptions","organizations_url":"https://api.github.com/users/shils/orgs","repos_url":"https://api.github.com/users/shils/repos","events_url":"https://api.github.com/users/shils/events{/privacy}","received_events_url":"https://api.github.com/users/shils/received_events","type":"User","site_admin":false},"created_at":"2015-11-11T04:30:02Z","updated_at":"2015-11-11T04:30:02Z","body":"A similar method named [tap](http://ruby-doc.org/core-2.0.0/Object.html#method-i-tap) exists in Ruby, and was implemented as an extension method [here](https://github.com/timyates/groovy-common-extensions#tap). As far as a vibe to add this, you'd probably get more feedback if you posted on the users mailing list."}}