{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,7,17]],"date-time":"2026-07-17T02:29:25Z","timestamp":1784255365933,"version":"3.55.0"},"reference-count":42,"publisher":"Association for Computing Machinery (ACM)","issue":"ICFP","license":[{"start":{"date-parts":[[2018,7,30]],"date-time":"2018-07-30T00:00:00Z","timestamp":1532908800000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"funder":[{"name":"EPSRC DTA","award":["OUCS\/GB\/1034913"],"award-info":[{"award-number":["OUCS\/GB\/1034913"]}]}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["Proc. ACM Program. Lang."],"published-print":{"date-parts":[[2018,7,30]]},"abstract":"<jats:p>Profunctor optics are a neat and composable representation of bidirectional data accessors, including lenses, and their dual, prisms. The profunctor representation exploits higher-order functions and higher-kinded type constructor classes, but the relationship between this and the familiar representation in terms of \"getter\" and \"setter\" functions is not at all obvious. We derive the profunctor representation from the concrete representation, making the relationship clear. It turns out to be a fairly direct application of the Yoneda Lemma, arguably the most important result in category theory. We hope this derivation aids understanding of the profunctor representation. Conversely, it might also serve to provide some insight into the Yoneda Lemma.<\/jats:p>","DOI":"10.1145\/3236779","type":"journal-article","created":{"date-parts":[[2018,7,31]],"date-time":"2018-07-31T19:41:18Z","timestamp":1533066078000},"page":"1-27","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":15,"title":["What you needa know about Yoneda: profunctor optics and the Yoneda lemma (functional pearl)"],"prefix":"10.1145","volume":"2","author":[{"given":"Guillaume","family":"Boisseau","sequence":"first","affiliation":[{"name":"University of Oxford, UK"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Jeremy","family":"Gibbons","sequence":"additional","affiliation":[{"name":"University of Oxford, UK"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2018,7,30]]},"reference":[{"key":"e_1_2_2_1_1","volume-title":"Band 16: Musikalische Schriften I\u2013III","author":"Adorno Theodor","year":"1978","unstructured":"Theodor Adorno . 1956. Fragment \u00fcber Musik und Sprache. Reprinted in Gesammelte Schriften , Band 16: Musikalische Schriften I\u2013III , Suhrkamp Verlag , 1978 , p251\u2013256. Theodor Adorno. 1956. Fragment \u00fcber Musik und Sprache. Reprinted in Gesammelte Schriften, Band 16: Musikalische Schriften I\u2013III, Suhrkamp Verlag, 1978, p251\u2013256."},{"key":"e_1_2_2_2_1","doi-asserted-by":"publisher","DOI":"10.1145\/1863597.1863607"},{"key":"e_1_2_2_3_1","volume-title":"Yoneda and Coyoneda Trick. (April","author":"Avramenko Alexey","year":"2017","unstructured":"Alexey Avramenko . 2017. Yoneda and Coyoneda Trick. (April 2017 ). https:\/\/medium.com\/@olxc\/ yoneda- and- coyoneda- trick- f5a0321aeba4 . Alexey Avramenko. 2017. Yoneda and Coyoneda Trick. (April 2017). https:\/\/medium.com\/@olxc\/ yoneda- and- coyoneda- trick- f5a0321aeba4 ."},{"key":"e_1_2_2_4_1","volume-title":"Category Theory","author":"Awodey Steve","unstructured":"Steve Awodey . 2006. Category Theory . Oxford University Press . Steve Awodey. 2006. Category Theory. Oxford University Press."},{"key":"e_1_2_2_5_1","volume-title":"Program Construction: Calculating Implementations from Specifcations","author":"Backhouse Roland","year":"2003","unstructured":"Roland Backhouse . 2003 . Program Construction: Calculating Implementations from Specifcations . Wiley . Roland Backhouse. 2003. Program Construction: Calculating Implementations from Specifcations. Wiley."},{"key":"e_1_2_2_6_1","doi-asserted-by":"publisher","DOI":"10.1145\/319628.319634"},{"key":"e_1_2_2_7_1","doi-asserted-by":"publisher","DOI":"10.1145\/1780.1781"},{"key":"e_1_2_2_8_1","volume-title":"Why Preorders Are Beautiful. (June","author":"Dijkstra Edsger W.","year":"1991","unstructured":"Edsger W. Dijkstra . 1991. Why Preorders Are Beautiful. (June 1991 ). EWD 1102; available from http:\/\/www.cs.utexas.edu\/ ~EWD\/ewd11xx\/EWD1102.PDF . Edsger W. Dijkstra. 1991. Why Preorders Are Beautiful. (June 1991). EWD1102; available from http:\/\/www.cs.utexas.edu\/ ~EWD\/ewd11xx\/EWD1102.PDF ."},{"key":"e_1_2_2_9_1","doi-asserted-by":"publisher","DOI":"10.1016\/S0020-0190(00)00195-2"},{"key":"e_1_2_2_10_1","doi-asserted-by":"publisher","DOI":"10.1145\/1040305.1040325"},{"key":"e_1_2_2_11_1","doi-asserted-by":"publisher","DOI":"10.1145\/2976002.2976005"},{"key":"e_1_2_2_12_1","volume-title":"APLicative Programming with Naperian Functors. In European Symposium on Programming (Lecture Notes in Computer Science), Hongseok Yang (Ed.)","volume":"10201","author":"Gibbons Jeremy","year":"2017","unstructured":"Jeremy Gibbons . 2017 . APLicative Programming with Naperian Functors. In European Symposium on Programming (Lecture Notes in Computer Science), Hongseok Yang (Ed.) , Vol. 10201 . Springer Berlin Heidelberg, 556\u2013583. Jeremy Gibbons. 2017. APLicative Programming with Naperian Functors. In European Symposium on Programming (Lecture Notes in Computer Science), Hongseok Yang (Ed.), Vol. 10201. Springer Berlin Heidelberg, 556\u2013583."},{"key":"e_1_2_2_13_1","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796809007291"},{"key":"e_1_2_2_14_1","unstructured":"Oleg Grenrus. 2017. Affine Traversal. http:\/\/oleg.fi\/gists\/posts\/2017- 03- 20- affine- traversal.html  Oleg Grenrus. 2017. Affine Traversal. http:\/\/oleg.fi\/gists\/posts\/2017- 03- 20- affine- traversal.html"},{"key":"e_1_2_2_15_1","volume-title":"What is a Naperian Container? (June","author":"Hancock Peter","year":"2005","unstructured":"Peter Hancock . 2005. What is a Naperian Container? (June 2005 ). http:\/\/sneezy.cs.nott.ac.uk\/containers\/blog\/?p=14 . Peter Hancock. 2005. What is a Naperian Container? (June 2005). http:\/\/sneezy.cs.nott.ac.uk\/containers\/blog\/?p=14 ."},{"key":"e_1_2_2_16_1","doi-asserted-by":"publisher","DOI":"10.1145\/1863495.1863507"},{"key":"e_1_2_2_17_1","doi-asserted-by":"publisher","DOI":"10.1016\/0020-0190(86)90059-1"},{"key":"e_1_2_2_18_1","volume-title":"A Representation Theorem for Second-Order Functionals. Journal of Functtional Programming 25","author":"Jaskelioff Mauro","year":"2015","unstructured":"Mauro Jaskelioff and Russell O\u2019Connor . 2015. A Representation Theorem for Second-Order Functionals. Journal of Functtional Programming 25 ( 2015 ). Mauro Jaskelioff and Russell O\u2019Connor. 2015. A Representation Theorem for Second-Order Functionals. Journal of Functtional Programming 25 (2015)."},{"key":"e_1_2_2_19_1","unstructured":"Edward Kmett. 2015. profunctor library Version 5. https:\/\/hackage.haskell.org\/package\/profunctors- 5  Edward Kmett. 2015. profunctor library Version 5. https:\/\/hackage.haskell.org\/package\/profunctors- 5"},{"key":"e_1_2_2_20_1","first-page":"16","article-title":"lens library","volume":"4","author":"Kmett Edward","year":"2018","unstructured":"Edward Kmett . 2018 . lens library , Version 4 . 16 . https:\/\/hackage.haskell.org\/package\/lens- 4.16 Edward Kmett. 2018. lens library, Version 4.16. https:\/\/hackage.haskell.org\/package\/lens- 4.16","journal-title":"Version"},{"key":"e_1_2_2_21_1","volume-title":"The Yoneda Lemma: What\u2019s It All About? (Oct","author":"Leinster Tom","year":"2000","unstructured":"Tom Leinster . 2000. The Yoneda Lemma: What\u2019s It All About? (Oct . 2000 ). http:\/\/www.maths.ed.ac.uk\/~tl\/categories\/ yoneda.ps . Tom Leinster. 2000. The Yoneda Lemma: What\u2019s It All About? (Oct. 2000). http:\/\/www.maths.ed.ac.uk\/~tl\/categories\/ yoneda.ps ."},{"key":"e_1_2_2_22_1","volume-title":"Categories for the Working Mathematician","author":"Lane Saunders Mac","unstructured":"Saunders Mac Lane . 1971. Categories for the Working Mathematician . Springer-Verlag . Saunders Mac Lane. 1971. Categories for the Working Mathematician. Springer-Verlag."},{"key":"e_1_2_2_23_1","unstructured":"Oleksandr Manzyuk. 2013. Co-Yoneda Lemma. (Jan. 2013). https:\/\/oleksandrmanzyuk.wordpress.com\/2013\/01\/18\/ co- yoneda- lemma\/ .  Oleksandr Manzyuk. 2013. Co-Yoneda Lemma. (Jan. 2013). https:\/\/oleksandrmanzyuk.wordpress.com\/2013\/01\/18\/ co- yoneda- lemma\/ ."},{"key":"e_1_2_2_24_1","doi-asserted-by":"publisher","DOI":"10.1145\/2784731.2784750"},{"key":"e_1_2_2_25_1","volume-title":"The Guardian (5th","author":"Matsumoto Shoukei","year":"2018","unstructured":"Shoukei Matsumoto . 2018. I Clean , Therefore I Am . The Guardian (5th January 2018 ). https:\/\/www.theguardian.com\/ commentisfree\/2018\/jan\/05\/buddhist- monk- cleaning- good- for- you . Shoukei Matsumoto. 2018. I Clean, Therefore I Am. The Guardian (5th January 2018). https:\/\/www.theguardian.com\/ commentisfree\/2018\/jan\/05\/buddhist- monk- cleaning- good- for- you ."},{"key":"e_1_2_2_26_1","volume-title":"The Topos of Music","author":"Mazzola Guerino","unstructured":"Guerino Mazzola . 2002. The Topos of Music . Birkh\u00e4user . Guerino Mazzola. 2002. The Topos of Music. Birkh\u00e4user."},{"key":"e_1_2_2_27_1","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796807006326"},{"key":"e_1_2_2_28_1","volume-title":"Profunctor Optics: The Categorical Approach. https:\/\/www.youtube.com\/watch?v=l1FCXUi6Vlw . Keynote at Lambda World conference, Cadiz.","author":"Milewski Bartosz","year":"2017","unstructured":"Bartosz Milewski . 2017 a. Profunctor Optics: The Categorical Approach. https:\/\/www.youtube.com\/watch?v=l1FCXUi6Vlw . Keynote at Lambda World conference, Cadiz. Bartosz Milewski. 2017a. Profunctor Optics: The Categorical Approach. https:\/\/www.youtube.com\/watch?v=l1FCXUi6Vlw . Keynote at Lambda World conference, Cadiz."},{"key":"e_1_2_2_29_1","volume-title":"Profunctor Optics: The Categorical View. (July","author":"Milewski Bartosz","year":"2017","unstructured":"Bartosz Milewski . 2017 b. Profunctor Optics: The Categorical View. (July 2017). https:\/\/bartoszmilewski.com\/2017\/07\/07\/ profunctor- optics- the- categorical- view\/ . Bartosz Milewski. 2017b. Profunctor Optics: The Categorical View. (July 2017). https:\/\/bartoszmilewski.com\/2017\/07\/07\/ profunctor- optics- the- categorical- view\/ ."},{"key":"e_1_2_2_30_1","volume-title":"Closure Conversion as CoYoneda. (Aug","author":"New Max","year":"2017","unstructured":"Max New . 2017. Closure Conversion as CoYoneda. (Aug . 2017 ). http:\/\/prl.ccs.neu.edu\/blog\/2017\/08\/28\/ closure- conversion- as- coyoneda\/ . Max New. 2017. Closure Conversion as CoYoneda. (Aug. 2017). http:\/\/prl.ccs.neu.edu\/blog\/2017\/08\/28\/ closure- conversion- as- coyoneda\/ ."},{"key":"e_1_2_2_31_1","unstructured":"Russell O\u2019Connor. 2014. Mainline Profunctor Hierarchy for Optics. http:\/\/r6research.livejournal.com\/27476.html  Russell O\u2019Connor. 2014. Mainline Profunctor Hierarchy for Optics. http:\/\/r6research.livejournal.com\/27476.html"},{"key":"e_1_2_2_32_1","volume-title":"Grate: A new kind of Optic. https:\/\/r6research.livejournal.com\/28050.html","author":"O\u2019Connor Russell","year":"2015","unstructured":"Russell O\u2019Connor . 2015 a. Grate: A new kind of Optic. https:\/\/r6research.livejournal.com\/28050.html Russell O\u2019Connor. 2015a. Grate: A new kind of Optic. https:\/\/r6research.livejournal.com\/28050.html"},{"key":"e_1_2_2_33_1","unstructured":"Russell O\u2019Connor. 2015b. mezzolens library Version 0. https:\/\/hackage.haskell.org\/package\/mezzolens- 0  Russell O\u2019Connor. 2015b. mezzolens library Version 0. https:\/\/hackage.haskell.org\/package\/mezzolens- 0"},{"key":"e_1_2_2_34_1","volume-title":"Profunctor Optics: Modular Data Accessors. The Art, Science, and Engineering of Programming 1, 2","author":"Pickering Matthew","year":"2017","unstructured":"Matthew Pickering , Jeremy Gibbons , and Nicolas Wu . 2017 . Profunctor Optics: Modular Data Accessors. The Art, Science, and Engineering of Programming 1, 2 (2017), Article 7. Matthew Pickering, Jeremy Gibbons, and Nicolas Wu. 2017. Profunctor Optics: Modular Data Accessors. The Art, Science, and Engineering of Programming 1, 2 (2017), Article 7."},{"key":"e_1_2_2_35_1","volume-title":"Reverse Engineering Machines with the Yoneda Lemma. (Nov","author":"Piponi Dan","year":"2006","unstructured":"Dan Piponi . 2006. Reverse Engineering Machines with the Yoneda Lemma. (Nov . 2006 ). http:\/\/blog.sigfpe.com\/2006\/11\/ yoneda- lemma.html . Dan Piponi. 2006. Reverse Engineering Machines with the Yoneda Lemma. (Nov. 2006). http:\/\/blog.sigfpe.com\/2006\/11\/ yoneda- lemma.html ."},{"key":"e_1_2_2_36_1","volume-title":"Category Theory in Context","author":"Riehl Emily","unstructured":"Emily Riehl . 2016. Category Theory in Context . Dover Publications . Available from http:\/\/www.math.jhu.edu\/~eriehl\/ context.pdf . Emily Riehl. 2016. Category Theory in Context. Dover Publications. Available from http:\/\/www.math.jhu.edu\/~eriehl\/ context.pdf ."},{"key":"e_1_2_2_37_1","volume-title":"The Continuation Passing Transform and the Yoneda Embedding. (Jan","author":"Stay Mike","year":"2008","unstructured":"Mike Stay . 2008. The Continuation Passing Transform and the Yoneda Embedding. (Jan . 2008 ). https:\/\/golem.ph.utexas.edu\/ category\/2008\/01\/the_continuation_passing_trans.html . Mike Stay. 2008. The Continuation Passing Transform and the Yoneda Embedding. (Jan. 2008). https:\/\/golem.ph.utexas.edu\/ category\/2008\/01\/the_continuation_passing_trans.html ."},{"key":"e_1_2_2_38_1","doi-asserted-by":"publisher","DOI":"10.1007\/s10270-008-0109-9"},{"key":"e_1_2_2_39_1","first-page":"p295","article-title":"Le\u00e7on Inaugurale du Cours de Po\u00e9tique du Coll\u00e8ge de France. Reprinted in Vari\u00e9t\u00e9 V","volume":"1944","author":"Val\u00e9ry Paul","year":"1937","unstructured":"Paul Val\u00e9ry . 1937 . Le\u00e7on Inaugurale du Cours de Po\u00e9tique du Coll\u00e8ge de France. Reprinted in Vari\u00e9t\u00e9 V , Gallimard , 1944 , p295 \u2013 p322 . Paul Val\u00e9ry. 1937. Le\u00e7on Inaugurale du Cours de Po\u00e9tique du Coll\u00e8ge de France. Reprinted in Vari\u00e9t\u00e9 V, Gallimard, 1944, p295\u2013322.","journal-title":"Gallimard"},{"key":"e_1_2_2_40_1","volume-title":"CPS-Based Functional References. (July","author":"van Laarhoven Twan","year":"2009","unstructured":"Twan van Laarhoven . 2009. CPS-Based Functional References. (July 2009 ). http:\/\/www.twanvl.nl\/blog\/haskell\/ cps- functional- references Twan van Laarhoven. 2009. CPS-Based Functional References. (July 2009). http:\/\/www.twanvl.nl\/blog\/haskell\/ cps- functional- references"},{"key":"e_1_2_2_41_1","volume-title":"Algebraic and Coalgebraic Methods in the Mathematics of Program Construction (Lecture Notes in Computer Science)","author":"von Karger Burghard","unstructured":"Burghard von Karger . 2002. Temporal Algebra . In Algebraic and Coalgebraic Methods in the Mathematics of Program Construction (Lecture Notes in Computer Science) , Roland Backhouse, Roy Crole , and Jeremy Gibbons (Eds.), Vol. 2297 . Springer-Verlag , 310\u2013386. Burghard von Karger. 2002. Temporal Algebra. In Algebraic and Coalgebraic Methods in the Mathematics of Program Construction (Lecture Notes in Computer Science), Roland Backhouse, Roy Crole, and Jeremy Gibbons (Eds.), Vol. 2297. Springer-Verlag, 310\u2013386."},{"key":"e_1_2_2_42_1","volume-title":"The Concatenate Vanishes. (Dec","author":"Wadler Philip","year":"1987","unstructured":"Philip Wadler . 1987. The Concatenate Vanishes. (Dec . 1987 ). University of Glasgow . Revised November 1989. Philip Wadler. 1987. The Concatenate Vanishes. (Dec. 1987). University of Glasgow. Revised November 1989."}],"container-title":["Proceedings of the ACM on Programming Languages"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3236779","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3236779","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,6,18]],"date-time":"2025-06-18T21:41:28Z","timestamp":1750282888000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3236779"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2018,7,30]]},"references-count":42,"journal-issue":{"issue":"ICFP","published-print":{"date-parts":[[2018,7,30]]}},"alternative-id":["10.1145\/3236779"],"URL":"https:\/\/doi.org\/10.1145\/3236779","relation":{},"ISSN":["2475-1421"],"issn-type":[{"value":"2475-1421","type":"electronic"}],"subject":[],"published":{"date-parts":[[2018,7,30]]},"assertion":[{"value":"2018-07-30","order":2,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}