On this page:
Generic Collections

Generic Collections

 (require data/collection) package: collections-lib

This provides a set of generic interfaces for built-in Racket collections to create a unified interface for working with Racket data structures. User-defined structures may also implement the collections API to provide implementations for additional datatypes.

This collection provides a number of bindings that override bindings in racket/base, some with slightly different semantics in addition to support for multiple kinds of collections. For this reason, this may not be a drop-in replacement for existing code.

    1 Introduction

    2 Examples

    3 API Documentation

      3.1 Generic Collections and Sequences

        3.1.1 Collections

 Generic Methods

 Derived Functions

        3.1.2 Sequences

 Generic Methods

 Derived Functions

      3.2 General-Purpose Interfaces

        3.2.1 Countable Collections

        3.2.2 Indexable Collections

        3.2.3 Using sequences with match

        3.2.4 Contracts on Collections

    4 Experimental Forms and Functions

      4.1 Generic Quasiquotation