Functional pearl: A smart view on datatypes
- Autores
- Jaskelioff, Mauro Javier; Rivas Gadda, Exequiel Matías
- Año de publicación
- 2015
- Idioma
- inglés
- Tipo de recurso
- artículo
- Estado
- versión publicada
- Descripción
- Left-nested list concatenations, left-nested binds on the free monad, and left-nested choices in many non-determinism monads have an algorithmically bad performance. Can we solve this problem without losing the ability to pattern-match on the computation? Surprisingly, there is a deceptively simple solution: use a smart view to pattern-match on the datatype. We introduce the notion of smart view and show how it solves the problem of slow leftnested operations. In particular, we use the technique to obtain fast and simple implementations of lists, of free monads, and of two non-determinism monads.
Fil: Jaskelioff, Mauro Javier. Consejo Nacional de Investigaciones Científicas y Técnicas. Centro Científico Tecnológico Conicet - Rosario. Centro Internacional Franco Argentino de Ciencias de la Información y de Sistemas. Universidad Nacional de Rosario. Centro Internacional Franco Argentino de Ciencias de la Información y de Sistemas; Argentina
Fil: Rivas Gadda, Exequiel Matías. Consejo Nacional de Investigaciones Científicas y Técnicas. Centro Científico Tecnológico Conicet - Rosario. Centro Internacional Franco Argentino de Ciencias de la Información y de Sistemas. Universidad Nacional de Rosario. Centro Internacional Franco Argentino de Ciencias de la Información y de Sistemas; Argentina - Materia
-
Data Structure
List
Monad
Monadplus - Nivel de accesibilidad
- acceso abierto
- Condiciones de uso
- https://creativecommons.org/licenses/by-nc-sa/2.5/ar/
- Repositorio
- Institución
- Consejo Nacional de Investigaciones Científicas y Técnicas
- OAI Identificador
- oai:ri.conicet.gov.ar:11336/53021
Ver los metadatos del registro completo
id |
CONICETDig_2357c7aac4a9103246c0f7f6d6346c43 |
---|---|
oai_identifier_str |
oai:ri.conicet.gov.ar:11336/53021 |
network_acronym_str |
CONICETDig |
repository_id_str |
3498 |
network_name_str |
CONICET Digital (CONICET) |
spelling |
Functional pearl: A smart view on datatypesJaskelioff, Mauro JavierRivas Gadda, Exequiel MatíasData StructureListMonadMonadplushttps://purl.org/becyt/ford/1.2https://purl.org/becyt/ford/1Left-nested list concatenations, left-nested binds on the free monad, and left-nested choices in many non-determinism monads have an algorithmically bad performance. Can we solve this problem without losing the ability to pattern-match on the computation? Surprisingly, there is a deceptively simple solution: use a smart view to pattern-match on the datatype. We introduce the notion of smart view and show how it solves the problem of slow leftnested operations. In particular, we use the technique to obtain fast and simple implementations of lists, of free monads, and of two non-determinism monads.Fil: Jaskelioff, Mauro Javier. Consejo Nacional de Investigaciones Científicas y Técnicas. Centro Científico Tecnológico Conicet - Rosario. Centro Internacional Franco Argentino de Ciencias de la Información y de Sistemas. Universidad Nacional de Rosario. Centro Internacional Franco Argentino de Ciencias de la Información y de Sistemas; ArgentinaFil: Rivas Gadda, Exequiel Matías. Consejo Nacional de Investigaciones Científicas y Técnicas. Centro Científico Tecnológico Conicet - Rosario. Centro Internacional Franco Argentino de Ciencias de la Información y de Sistemas. Universidad Nacional de Rosario. Centro Internacional Franco Argentino de Ciencias de la Información y de Sistemas; ArgentinaAssociation for Computing Machinery2015-08info:eu-repo/semantics/articleinfo:eu-repo/semantics/publishedVersionhttp://purl.org/coar/resource_type/c_6501info:ar-repo/semantics/articuloapplication/pdfapplication/pdfapplication/pdfhttp://hdl.handle.net/11336/53021Jaskelioff, Mauro Javier; Rivas Gadda, Exequiel Matías; Functional pearl: A smart view on datatypes; Association for Computing Machinery; Proceedings of the ACM SIGPLAN International Conference on Functional Programming, ICFP; 2015-August; 8-2015; 355-3610362-1340CONICET DigitalCONICETenginfo:eu-repo/semantics/altIdentifier/doi/10.1145/2784731.2784743info:eu-repo/semantics/altIdentifier/url/https://dl.acm.org/citation.cfm?doid=2784731.2784743info:eu-repo/semantics/openAccesshttps://creativecommons.org/licenses/by-nc-sa/2.5/ar/reponame:CONICET Digital (CONICET)instname:Consejo Nacional de Investigaciones Científicas y Técnicas2025-09-29T10:34:45Zoai:ri.conicet.gov.ar:11336/53021instacron:CONICETInstitucionalhttp://ri.conicet.gov.ar/Organismo científico-tecnológicoNo correspondehttp://ri.conicet.gov.ar/oai/requestdasensio@conicet.gov.ar; lcarlino@conicet.gov.arArgentinaNo correspondeNo correspondeNo correspondeopendoar:34982025-09-29 10:34:45.549CONICET Digital (CONICET) - Consejo Nacional de Investigaciones Científicas y Técnicasfalse |
dc.title.none.fl_str_mv |
Functional pearl: A smart view on datatypes |
title |
Functional pearl: A smart view on datatypes |
spellingShingle |
Functional pearl: A smart view on datatypes Jaskelioff, Mauro Javier Data Structure List Monad Monadplus |
title_short |
Functional pearl: A smart view on datatypes |
title_full |
Functional pearl: A smart view on datatypes |
title_fullStr |
Functional pearl: A smart view on datatypes |
title_full_unstemmed |
Functional pearl: A smart view on datatypes |
title_sort |
Functional pearl: A smart view on datatypes |
dc.creator.none.fl_str_mv |
Jaskelioff, Mauro Javier Rivas Gadda, Exequiel Matías |
author |
Jaskelioff, Mauro Javier |
author_facet |
Jaskelioff, Mauro Javier Rivas Gadda, Exequiel Matías |
author_role |
author |
author2 |
Rivas Gadda, Exequiel Matías |
author2_role |
author |
dc.subject.none.fl_str_mv |
Data Structure List Monad Monadplus |
topic |
Data Structure List Monad Monadplus |
purl_subject.fl_str_mv |
https://purl.org/becyt/ford/1.2 https://purl.org/becyt/ford/1 |
dc.description.none.fl_txt_mv |
Left-nested list concatenations, left-nested binds on the free monad, and left-nested choices in many non-determinism monads have an algorithmically bad performance. Can we solve this problem without losing the ability to pattern-match on the computation? Surprisingly, there is a deceptively simple solution: use a smart view to pattern-match on the datatype. We introduce the notion of smart view and show how it solves the problem of slow leftnested operations. In particular, we use the technique to obtain fast and simple implementations of lists, of free monads, and of two non-determinism monads. Fil: Jaskelioff, Mauro Javier. Consejo Nacional de Investigaciones Científicas y Técnicas. Centro Científico Tecnológico Conicet - Rosario. Centro Internacional Franco Argentino de Ciencias de la Información y de Sistemas. Universidad Nacional de Rosario. Centro Internacional Franco Argentino de Ciencias de la Información y de Sistemas; Argentina Fil: Rivas Gadda, Exequiel Matías. Consejo Nacional de Investigaciones Científicas y Técnicas. Centro Científico Tecnológico Conicet - Rosario. Centro Internacional Franco Argentino de Ciencias de la Información y de Sistemas. Universidad Nacional de Rosario. Centro Internacional Franco Argentino de Ciencias de la Información y de Sistemas; Argentina |
description |
Left-nested list concatenations, left-nested binds on the free monad, and left-nested choices in many non-determinism monads have an algorithmically bad performance. Can we solve this problem without losing the ability to pattern-match on the computation? Surprisingly, there is a deceptively simple solution: use a smart view to pattern-match on the datatype. We introduce the notion of smart view and show how it solves the problem of slow leftnested operations. In particular, we use the technique to obtain fast and simple implementations of lists, of free monads, and of two non-determinism monads. |
publishDate |
2015 |
dc.date.none.fl_str_mv |
2015-08 |
dc.type.none.fl_str_mv |
info:eu-repo/semantics/article info:eu-repo/semantics/publishedVersion http://purl.org/coar/resource_type/c_6501 info:ar-repo/semantics/articulo |
format |
article |
status_str |
publishedVersion |
dc.identifier.none.fl_str_mv |
http://hdl.handle.net/11336/53021 Jaskelioff, Mauro Javier; Rivas Gadda, Exequiel Matías; Functional pearl: A smart view on datatypes; Association for Computing Machinery; Proceedings of the ACM SIGPLAN International Conference on Functional Programming, ICFP; 2015-August; 8-2015; 355-361 0362-1340 CONICET Digital CONICET |
url |
http://hdl.handle.net/11336/53021 |
identifier_str_mv |
Jaskelioff, Mauro Javier; Rivas Gadda, Exequiel Matías; Functional pearl: A smart view on datatypes; Association for Computing Machinery; Proceedings of the ACM SIGPLAN International Conference on Functional Programming, ICFP; 2015-August; 8-2015; 355-361 0362-1340 CONICET Digital CONICET |
dc.language.none.fl_str_mv |
eng |
language |
eng |
dc.relation.none.fl_str_mv |
info:eu-repo/semantics/altIdentifier/doi/10.1145/2784731.2784743 info:eu-repo/semantics/altIdentifier/url/https://dl.acm.org/citation.cfm?doid=2784731.2784743 |
dc.rights.none.fl_str_mv |
info:eu-repo/semantics/openAccess https://creativecommons.org/licenses/by-nc-sa/2.5/ar/ |
eu_rights_str_mv |
openAccess |
rights_invalid_str_mv |
https://creativecommons.org/licenses/by-nc-sa/2.5/ar/ |
dc.format.none.fl_str_mv |
application/pdf application/pdf application/pdf |
dc.publisher.none.fl_str_mv |
Association for Computing Machinery |
publisher.none.fl_str_mv |
Association for Computing Machinery |
dc.source.none.fl_str_mv |
reponame:CONICET Digital (CONICET) instname:Consejo Nacional de Investigaciones Científicas y Técnicas |
reponame_str |
CONICET Digital (CONICET) |
collection |
CONICET Digital (CONICET) |
instname_str |
Consejo Nacional de Investigaciones Científicas y Técnicas |
repository.name.fl_str_mv |
CONICET Digital (CONICET) - Consejo Nacional de Investigaciones Científicas y Técnicas |
repository.mail.fl_str_mv |
dasensio@conicet.gov.ar; lcarlino@conicet.gov.ar |
_version_ |
1844614364575825920 |
score |
13.070432 |