{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,5,26]],"date-time":"2026-05-26T23:05:37Z","timestamp":1779836737588,"version":"3.53.1"},"reference-count":30,"publisher":"Cambridge University Press (CUP)","license":[{"start":{"date-parts":[[2015,9,8]],"date-time":"2015-09-08T00:00:00Z","timestamp":1441670400000},"content-version":"unspecified","delay-in-days":250,"URL":"http:\/\/creativecommons.org\/licenses\/by-nc-sa\/3.0\/"}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["J. Funct. Prog."],"published-print":{"date-parts":[[2015]]},"abstract":"<jats:title>Abstract<\/jats:title>\n                  <jats:p>Representation theorems relate seemingly complex objects to concrete, more tractable ones. In this paper, we take advantage of the abstraction power of category theory and provide a datatype-generic representation theorem. More precisely, we prove a representation theorem for a wide class of second-order functionals which are polymorphic over a class of functors. Types polymorphic over a class of functors are easily representable in languages such as Haskell, but are difficult to analyse and reason about. The concrete representation provided by the theorem is easier to analyse, but it might not be as convenient to implement. Therefore, depending on the task at hand, the change of representation may prove valuable in one direction or the other. We showcase the usefulness of the representation theorem with a range of examples. Concretely, we show how the representation theorem can be used to prove that traversable functors are finitary containers, how coalgebras of a parameterised store comonad relate to very well-behaved lenses, and how algebraic effects might be implemented in a functional language.<\/jats:p>","DOI":"10.1017\/s0956796815000088","type":"journal-article","created":{"date-parts":[[2015,9,8]],"date-time":"2015-09-08T07:45:13Z","timestamp":1441698313000},"source":"Crossref","is-referenced-by-count":12,"title":["A representation theorem for second-order functionals"],"prefix":"10.1017","volume":"25","author":[{"given":"MAURO","family":"JASKELIOFF","sequence":"first","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"RUSSELL","family":"O'CONNOR","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"56","published-online":{"date-parts":[[2015,9,8]]},"reference":[{"key":"S0956796815000088_ref17","doi-asserted-by":"publisher","DOI":"10.1007\/978-1-4612-9839-7"},{"key":"S0956796815000088_ref30","unstructured":"Van Laarhoven T. 2009c (Apr.) Where Do I Get My Non-Regular Types? Available at: http:\/\/twanvl.nl\/blog\/haskell\/non-regular2."},{"key":"S0956796815000088_ref6","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-37075-5_15"},{"key":"S0956796815000088_ref13","unstructured":"Gibbons J. & Johnson M. (2012) Relating algebraic and coalgebraic descriptions of lenses. 49 (Bidirectional Transformations 2012). Berlin, Germany."},{"key":"S0956796815000088_ref4","doi-asserted-by":"publisher","DOI":"10.1093\/acprof:oso\/9780198568612.001.0001"},{"key":"S0956796815000088_ref7","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-11957-6_8"},{"key":"S0956796815000088_ref5","doi-asserted-by":"publisher","DOI":"10.1016\/0304-3975(90)90151-7"},{"key":"S0956796815000088_ref24","doi-asserted-by":"publisher","DOI":"10.1023\/A:1023064908962"},{"key":"S0956796815000088_ref21","unstructured":"O'Connor R. 2010 (Nov.) Lenses are Exactly the Coalgebras for the Store Comonad. Available at: http:\/\/r6research.livejournal.com\/23705.html."},{"key":"S0956796815000088_ref16","unstructured":"Kmett E. 2013 (October) Lens-4.0: Lenses, Folds and Traversals. Available at: http:\/\/ekmett.github.io\/lens\/Control-Lens-Traversal.html."},{"key":"S0956796815000088_ref19","unstructured":"Milewski B. 2013 (October) Lenses, Stores, and Yoneda. Available at: http:\/\/bartoszmilewski.com\/2013\/10\/08\/lenses-stores-and-yoneda."},{"key":"S0956796815000088_ref28","unstructured":"Van Laarhoven T. 2009a (Aug.) CPS Based Functional References. Available at: http:\/\/twanvl.nl\/blog\/haskell\/cps-functional-references."},{"key":"S0956796815000088_ref27","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796808006758"},{"key":"S0956796815000088_ref10","unstructured":"Capriotti P. & Kaposi A. 2014 (April) Free applicative functors. In Proceedings of the 5th Workshop on Mathematically Structured Functional Programming. MSFP '14, pp. 2\u201330."},{"key":"S0956796815000088_ref1","doi-asserted-by":"publisher","DOI":"10.1007\/3-540-36576-1_2"},{"key":"S0956796815000088_ref29","unstructured":"Van Laarhoven T. 2009b (Apr.) A Non-Regular Data Type Challenge. Available at: http:\/\/twanvl.nl\/blog\/haskell\/non-regular1."},{"key":"S0956796815000088_ref12","doi-asserted-by":"publisher","DOI":"10.1145\/1232420.1232424"},{"key":"S0956796815000088_ref22","unstructured":"O'Connor R. (2011) Functor is to lens as applicative is to biplate: Introducing multiplate. Corr, abs\/1103.2841v1."},{"key":"S0956796815000088_ref2","doi-asserted-by":"crossref","unstructured":"Atkey R. (2009a) Algebras for parameterised monads. In Proceedings of the Algebra and Coalgebra in Computer Science, 3rd International Conference, CALCO 2009, Udine, Italy (September 7\u201310, 2009), Kurz A. , Lenisa M. & Tarlecki A. (eds), vol. 5728. Lecture Notes in Computer Science, Springer, pp. 3\u201317.","DOI":"10.1007\/978-3-642-03741-2_2"},{"key":"S0956796815000088_ref3","doi-asserted-by":"publisher","DOI":"10.1017\/S095679680900728X"},{"key":"S0956796815000088_ref11","doi-asserted-by":"publisher","DOI":"10.1145\/1111320.1111056"},{"key":"S0956796815000088_ref14","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796809007291"},{"key":"S0956796815000088_ref18","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796807006326"},{"key":"S0956796815000088_ref23","unstructured":"O'Connor R. , Kmett E. A. & Morris T. 2013 (October) Data-lens-2.10.4: Haskell 98 lenses. Available at: http:\/\/hackage.haskell.org\/package\/data-lens-2.10.4\/docs\/Data-Lens-Partial-Common.html."},{"key":"S0956796815000088_ref25","volume-title":"Programming Languages and Systems","author":"Plotkin","year":"2009"},{"key":"S0956796815000088_ref26","doi-asserted-by":"publisher","DOI":"10.1006\/inco.1993.1037"},{"key":"S0956796815000088_ref20","doi-asserted-by":"publisher","DOI":"10.1016\/S1571-0661(05)80316-0"},{"key":"S0956796815000088_ref15","unstructured":"Jaskelioff M. & Rypacek O. (2012) An investigation of the laws of traversals. In Proceedings of the 4th Workshop on Mathematically Structured Functional Programming. EPTCS, Chapman J. & Levy P. B. (eds), vol. 76, pp. 40\u201349."},{"key":"S0956796815000088_ref8","volume-title":"Algebra of Programming","author":"Bird","year":"1997"},{"key":"S0956796815000088_ref9","doi-asserted-by":"publisher","DOI":"10.1145\/2503778.2503781"}],"container-title":["Journal of Functional Programming"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.cambridge.org\/core\/services\/aop-cambridge-core\/content\/view\/S0956796815000088","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,5,26]],"date-time":"2026-05-26T22:36:07Z","timestamp":1779834967000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.cambridge.org\/core\/product\/identifier\/S0956796815000088\/type\/journal_article"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2015]]},"references-count":30,"alternative-id":["S0956796815000088"],"URL":"https:\/\/doi.org\/10.1017\/s0956796815000088","relation":{},"ISSN":["0956-7968","1469-7653"],"issn-type":[{"value":"0956-7968","type":"print"},{"value":"1469-7653","type":"electronic"}],"subject":[],"published":{"date-parts":[[2015]]},"article-number":"e13"}}