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 gdrive-sheets
3.22 data-source
3.23 reactors
3.24 chart
3.25 plot
3.26 statistics
3.27 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 Mapping extensions

        3.6.8.2 Reducers

      3.6.9 Comparing Tables

      3.6.10 Advanced Table Manipulation

    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 Creation Functions

      3.9.2 Array Methods

      3.9.3 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 The PPrintDoc Datatype

      3.15.2 PPrintDoc Methods

      3.15.3 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 Starting a big-bang

      3.20.2 Functions

      3.20.3 Data Types

    3.21 gdrive-sheets

      3.21.1 The Spreadsheet Type

      3.21.2 The Worksheet Type

      3.21.3 Spreadsheet Functions

      3.21.4 Spreadsheet Methods

    3.22 data-source

      3.22.1 The CellContent Type

      3.22.2 Sanitizers

        3.22.2.1 Pre-defined sanitizers

    3.23 reactors

      3.23.1 Creating Reactors

      3.23.2 Configuring and Running a Reactor

        3.23.2.1 init

        3.23.2.2 on-tick

        3.23.2.3 seconds-per-tick

        3.23.2.4 to-draw

        3.23.2.5 on-key

        3.23.2.6 on-mouse

        3.23.2.7 stop-when

        3.23.2.8 close-when-stop

        3.23.2.9 title

      3.23.3 Reacting to Events Manually

      3.23.4 Tracing

    3.24 chart

      3.24.1 Creating a DataSeries

      3.24.2 Creating a ChartWindow

        3.24.2.1 Interactive Dialog

      3.24.3 Chart Constructors for List Interface

      3.24.4 DataSeries

        3.24.4.1 Function Plot Series

        3.24.4.2 Line Plot Series

        3.24.4.3 Scatter Plot Series

        3.24.4.4 Bar Chart Series

        3.24.4.5 Pie Chart Series

        3.24.4.6 Histogram Series

      3.24.5 Renderers

      3.24.6 ChartWindow

        3.24.6.1 Shared Methods

        3.24.6.2 Plot Chart Window

        3.24.6.3 Bar Chart Window

        3.24.6.4 Pie Chart Window

        3.24.6.5 Histogram Chart Window

    3.25 plot

      3.25.1 The Plot Type

      3.25.2 Plot Functions

      3.25.3 Visualization Functions

      3.25.4 The Options Types and Default Values

    3.26 statistics

      3.26.1 Basic Statistical Values

      3.26.2 The StatModel Type

      3.26.3 StatModel Methods

      3.26.4 Regression and Modeling

    3.27 math

      3.27.1 Arithmetic Functions

      3.27.2 Minimization & Maximization