{"action":"opened","issue":{"url":"https://api.github.com/repos/oflatt/space-orbs/issues/9","labels_url":"https://api.github.com/repos/oflatt/space-orbs/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/oflatt/space-orbs/issues/9/comments","events_url":"https://api.github.com/repos/oflatt/space-orbs/issues/9/events","html_url":"https://github.com/oflatt/space-orbs/issues/9","id":120441075,"number":9,"title":"define-nested-lenses shorthand","user":{"login":"AlexKnauth","id":6600123,"avatar_url":"https://avatars.githubusercontent.com/u/6600123?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexKnauth","html_url":"https://github.com/AlexKnauth","followers_url":"https://api.github.com/users/AlexKnauth/followers","following_url":"https://api.github.com/users/AlexKnauth/following{/other_user}","gists_url":"https://api.github.com/users/AlexKnauth/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexKnauth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexKnauth/subscriptions","organizations_url":"https://api.github.com/users/AlexKnauth/orgs","repos_url":"https://api.github.com/users/AlexKnauth/repos","events_url":"https://api.github.com/users/AlexKnauth/events{/privacy}","received_events_url":"https://api.github.com/users/AlexKnauth/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-04T16:50:15Z","updated_at":"2015-12-04T16:50:15Z","closed_at":null,"body":"The [`define-nested-lenses`](http://pkg-build.racket-lang.org/doc/unstable-lens/index.html#%28part._.Lenses_for_nested_data%29) form was just added so that instead of doing this:\r\n```racket\r\n(define game-orbs-enemys-lens (lens-thrush game-orbs-lens orbs-enemys-lens))\r\n(define game-orbs-player-lens (lens-thrush game-orbs-lens orbs-player-lens))\r\n(define game-orbs-player-pos-lens (lens-thrush game-orbs-player-lens orb-pos-lens))\r\n(define game-orbs-player-time-lens (lens-thrush game-orbs-player-lens orb-time-lens))\r\n(define game-orbs-player-shots-lens (lens-thrush game-orbs-player-lens orb-shots-lens))\r\n(define game-orbs-player-deaths-lens (lens-thrush game-orbs-player-lens orb-deaths-lens))\r\n(define game-orbs-player-kills-lens (lens-thrush game-orbs-player-lens orb-kills-lens))\r\n```\r\nYou can do stuff like this:\r\n```racket\r\n(define-nested-lenses [orbs-player orbs-player-lens]\r\n  [pos orb-pos-lens]\r\n  [time orb-time-lens]\r\n  [shots orb-shots-lens]\r\n  [deaths orb-deaths-lens]\r\n  [kills orb-kills-lens])\r\n(define-nested-lenses [game-orbs game-orbs-lens]\r\n  [enemys orbs-enemys-lens]\r\n  [player orbs-player-lens]\r\n  [player-pos orbs-player-pos-lens]\r\n  [player-time orbs-player-time-lens]\r\n  [player-shots orbs-player-shots-lens]\r\n  [player-deaths orbs-player-deaths-lens]\r\n  [player-kills orbs-player-kills-lens])\r\n```\r\nYour game was even the main motivation for this feature: https://github.com/jackfirth/lens/issues/233"}}