## Functional Data Structures for Typed Racket

Citations: | 1 - 0 self |

### BibTeX

@MISC{R_functionaldata,

author = {Hari Prashanth K R and Sam Tobin-hochstadt},

title = {Functional Data Structures for Typed Racket},

year = {}

}

### OpenURL

### Abstract

Scheme provides excellent language support for programming in a functional style, but little in the way of library support. In this paper, we present a comprehensive library of functional data structures, drawing from several sources. We have implemented the library in Typed Racket, a typed variant of Racket, allowing us to maintain the type invariants of the original definitions. 1. Functional Data Structures for a Functional Language Functional programming requires more than just lambda; library support for programming in a functional style is also required. In particular, efficient and persistent functional data structures are needed in almost every program. Scheme does provide one supremely valuable functional data structure—the linked list. This is sufficient to support many forms

### Citations

384 | Tarjan, "Self-adjusting binary search trees
- Sleator, E
- 1985
(Show Context)
Citation Context ...heaps. Pairing Heaps provide a worst-case running time of O(1) for the operations insert, find-min/max and merge, and an amortized running time of O(log n) for delete-min/max. Splay Heap Splay Heaps (=-=Sleator and Tarjan 1985-=-) are very similar to balanced binary search trees. The difference between the two is that Splay Heaps do not maintain explicit balance information. Instead, every operation on a splay heap restructur... |

243 | Purely Functional Data Structures
- Okasaki
- 1998
(Show Context)
Citation Context ...ine que (queue -1 0 1 2 3 4)) > que - : (Queue Fixnum) #<Queue> > (head que) - : Fixnum -1 > (head (tail que)) - : Fixnum 0 > (head (enqueue 10 que)) - : Fixnum -1 Banker’s Queues The Bankers Queues (=-=Okasaki 1998-=-) are amortized queues obtained using a method of amortization called the Banker’s method. The Banker’s Queue combines the techniques of lazy evaluation and memoization to obtain good amortized runnin... |

171 | Local type inference - Pierce, Turner - 1998 |

69 |
The Design and Implementation of Typed Scheme
- Tobin-Hochstadt, Felleisen
- 2008
(Show Context)
Citation Context ...We then detail the experience of using Typed Racket for this project, both positive and negative. Finally, we discuss other implementations and conclude. 1.1 An Overview of Typed Racket Typed Racket (=-=Tobin-Hochstadt and Felleisen 2008-=-; Tobin-Hochstadt 2010) is an explicitly typed dialect of Scheme, implemented in Racket (Flatt and PLT 2010). Typed Racket supports both integration with untyped Scheme code as well as a typechecker d... |

47 |
The pairing heap: A new form of self-adjusting heap
- Fredman, Sedgewick, et al.
- 1986
(Show Context)
Citation Context ... The Leftist Heaps provide a worst-case running time of O(log n) for the operations insert, delete-min/max and merge and a worst-case running time of O(1) for findmin/max. Pairing Heap Pairing Heaps (=-=Fredman et al. 1986-=-) are a type of heap which have a very simple implementation and extremely good amortized performance in practice. However, it has proved very difficult to come up with exact asymptotic running time f... |

12 | An applicative random-access stack
- MYERS
- 1983
(Show Context)
Citation Context ...te-min/max and merge is O(log n). Skew Binomial Heap Skew Binomial Heaps are similar to Binomial Heaps, but with a hybrid numerical representation for heaps which is based on the skew binary numbers (=-=Myers 1983-=-). The skew binary number representation is used since incrementing skew binary numbers is quick and simple. Since the skew binary numbers have a complicated addition, the merge operation is based on ... |

7 | Fast functional lists, hash-lists, deques and variable length arrays - Bagwell |

7 | Practical variable-arity polymorphism
- Strickland, Tobin-Hochstadt, et al.
- 2009
(Show Context)
Citation Context ...ure version of Typed Racket. It is currently not possible to correctly type Scheme functions such as foldr and foldl because of the limitations of Typed Racket’s handling of variable-arity functions (=-=Strickland et al. 2009-=-).Typed Racket’s use of local type inference also leads to potential errors, especially in the presence of precise types for Scheme’s numeric hierarchy. For example, Typed Racket distinguishes intege... |

4 |
Component Deployment with PLaneT: You Want it Where
- Matthews
- 2006
(Show Context)
Citation Context ...ation is structurally similar the original work. We know of no existing comprehensive library of functional data structures for Scheme. Racket’s existing collection of userprovided libraries, PLaneT (=-=Matthews 2006-=-), contains an implementation of Random Access Lists (Van Horn 2010), as well as a collection of several functional data structures (Soegaard 2009). VLists and several other functional data structures... |

3 | Fast And Space Efficient Trie Searches - Bagwell - 2000 |

3 | Typed Scheme: From Scripts to Programs
- Tobin-Hochstadt
- 2010
(Show Context)
Citation Context ...ng Typed Racket for this project, both positive and negative. Finally, we discuss other implementations and conclude. 1.1 An Overview of Typed Racket Typed Racket (Tobin-Hochstadt and Felleisen 2008; =-=Tobin-Hochstadt 2010-=-) is an explicitly typed dialect of Scheme, implemented in Racket (Flatt and PLT 2010). Typed Racket supports both integration with untyped Scheme code as well as a typechecker designed to work with i... |

1 |
Scheme Utilities, version 7. PLaneT Package Repository
- Eastlund
- 2010
(Show Context)
Citation Context ...e The table in figure 1 shows the performance of the Physicist’s Queue, Banker’s Queue, Real-Time Queue and Bootstrapped Queue compared with an implementation based on lists, and an imperative queue (=-=Eastlund 2010-=-). 3 3.2 Heap Performance The table in figure 2 shows the performance of the Leftist Heap, Pairing Heap, Binomial Heap and Bootstrapped Heap, compared with an implementation based on sorted lists, and... |

1 | http://clojure.org Haim Kaplan and Robert E. Tarjan. Persistent lists with catenation via recursive slow-down - Clojure - 1995 |

1 | version 4.2. PLaneT Package Repository - Galore - 2009 |

1 | RaList: Purely Functional Random-Access Lists, version 2.3. PLaneT Package Repository - Horn - 2010 |