© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2023
D. YangIntroducing ReScripthttps://doi.org/10.1007/978-1-4842-8888-7_6

6. Collections

Danny Yang1  
(1)
Mountain View, CA, USA
 

In this chapter, we’ll discuss other common data structures for representing collections of values: sets, maps, stacks, and queues. ReScript’s standard libraries provide several options for these collections, with similar APIs but different use cases. We’ll break down these collections into two categories: immutable collections and mutable collections.

Like lists, updates on immutable collections are functional and do not actually change the contents of the collection being updated. Instead, they return a new collection with the update ...

Get Introducing ReScript: Functional Programming for Web Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.