Builtins and Libraries
3.1 Global Utilities
3.2 Numbers
3.3 Strings
3.4 Booleans
3.5 Raw  Array
3.6 Tables
3.7 lists
3.8 sets
3.9 arrays
3.10 string-dict
3.11 option
3.12 pick
3.13 either
3.14 srcloc
3.15 pprint
3.16 s-exp
3.17 s-exp-structs
3.18 image-structs
3.19 image
3.20 world
3.21 reactors
3.22 plot
3.23 statistics
3.24 math

3 Builtins and Libraries

This section contains information on libraries that come with Pyret.

    3.1 Global Utilities

      3.1.1 Built-in Utility Functions

      3.1.2 Built-in Types

      3.1.3 Type Predicates

    3.2 Numbers

      3.2.1 Number Annotations

      3.2.2 Number Literals

      3.2.3 Number Functions

      3.2.4 Random Numbers

      3.2.5 Other Number Functions

    3.3 Strings

      3.3.1 String Functions

    3.4 Booleans

      3.4.1 Boolean Functions

    3.5 RawArray

      3.5.1 RawArray Functions

    3.6 Tables

      3.6.1 Creating Tables

      3.6.2 Loading Tables

      3.6.3 Selecting Columns

      3.6.4 Filtering Tables

      3.6.5 Ordering Tables

      3.6.6 Transforming Tables

      3.6.7 Extracting Columns from Tables

      3.6.8 Extending Tables

        3.6.8.1 Reducers

      3.6.9 Comparing Tables

    3.7 lists

      3.7.1 The List Datatype

      3.7.2 The list Constructor

      3.7.3 List Methods

      3.7.4 List Functions

    3.8 sets

      3.8.1 The Set Type

      3.8.2 Set Constructors

      3.8.3 Set Methods

    3.9 arrays

      3.9.1 Array Constructor

      3.9.2 Other Ways to Build Arrays

      3.9.3 Array Methods

      3.9.4 Array Functions

    3.10 string-dict

      3.10.1 The StringDict Type

      3.10.2 StringDict Constructor

      3.10.3 StringDict Methods

      3.10.4 The MutableStringDict Type

      3.10.5 MutableStringDict Constructor

      3.10.6 MutableStringDict Methods

    3.11 option

      3.11.1 The Option Datatype

      3.11.2 Option Methods

    3.12 pick

      3.12.1 The Pick Datatype

    3.13 either

      3.13.1 Data types

    3.14 srcloc

      3.14.1 Data types

      3.14.2 Functions

    3.15 pprint

      3.15.1 Data types

      3.15.2 Functions

    3.16 s-exp

    3.17 s-exp-structs

      3.17.1 The S-Exp Datatype

    3.18 image-structs

      3.18.1 Data types

      3.18.2 Predefined colors

    3.19 image

      3.19.1 Data Types

      3.19.2 Basic Images

      3.19.3 Text

      3.19.4 Polygons

      3.19.5 Overlaying Images

      3.19.6 Placing Images & Scenes

      3.19.7 Rotating, Scaling, Flipping, Cropping and Framing Images

      3.19.8 Bitmaps

      3.19.9 Image Properties

      3.19.10 Image Predicates

      3.19.11 Image Equality

    3.20 world

      3.20.1 Data Types

      3.20.2 Functions

    3.21 reactors

      3.21.1 Creating Reactors

      3.21.2 Configuring and Running a Reactor

        3.21.2.1 init

        3.21.2.2 on-tick

        3.21.2.3 to-draw

        3.21.2.4 on-mouse

        3.21.2.5 on-key

        3.21.2.6 stop-when

        3.21.2.7 close-when-stop

        3.21.2.8 seconds-per-tick

        3.21.2.9 title

      3.21.3 Reacting to Events Manually

      3.21.4 Tracing

    3.22 plot

      3.22.1 The Plot Type

      3.22.2 Plot Functions

      3.22.3 Visualization Functions

      3.22.4 The Options Types and Default Values

    3.23 statistics

      3.23.1 Basic Statistical Values

      3.23.2 The StatModel Type

      3.23.3 StatModel Methods

      3.23.4 Regression and Modeling

    3.24 math

      3.24.1 Arithmetic Functions

      3.24.2 Minimization & Maximization