Unrolling Lists
- đ¤ Speaker: Jake Bennett-Woolf (University of Cambridge)
- đ Date & Time: Monday 18 November 2024, 13:00 - 14:00
- đ Venue: FS07, Computer Laboratory
Abstract
Lists are used throughout functional programming and the idea of defining lists with multiple heads for optimisation is almost as old as the subject itself. We present a theoretical justification for $\mathbb{N}$-indexed (multi-headed) lists as the natural datatypes that comes from unrolling the defining equation $X = 1 + A \times X$ for lists, and give $\mathbb{N}$-indexed implementations of functions that normally use intermediate lists and that satisfy certain conditions.
We then discuss staged metaprogramming and use this to speed up these functions so that they are at least as fast as their usual list counterparts. Our guiding examples will be tail-recursive $\map$ and $\filter$ for lists in OCaml.
Series This talk is part of the SANDWICH Seminar (Computer Laboratory) series.
Included in Lists
Note: Ex-directory lists are not shown.
![[Talks.cam]](/static/images/talkslogosmall.gif)


Monday 18 November 2024, 13:00-14:00