Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

The SOF standard library

This is the official collection of library functions and classes provided by the SOF system.

Methods on built-in types

When performing a field call with certain identifiers, certain methods can be retrieved. This allows invoking those methods on primitive types, for example:

# sine of 3.2
3.2 sin ;
# retrieve first element of list
0 [ 1 2 ] idx ;

Defined methods are described separately for each type in the sub-sections.

Files in the standard library

  • math: Usual mathematical operations.
  • op: Built-in operations as callables.
  • io: (Not implemented) File input/output.
  • fp: (Not implemented) Helpers and tools for functional programming.