builtins

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 31, 2023 License: EUPL-1.2 Imports: 3 Imported by: 1

Documentation

Overview

Package builtins contains functions that help to build builtin functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckArgs

func CheckArgs(args []sxpf.Object, minArgs, maxArgs int) error

CheckArgs validates the number of arguments given.

func GetCallable

func GetCallable(err error, args []sxpf.Object, pos int) (eval.Callable, error)

GetCallable returns the given argument as a callable, and checks for errors.

func GetEnvironment

func GetEnvironment(err error, args []sxpf.Object, pos int) (sxpf.Environment, error)

GetEnvironment returns the given argument as an environment, and checks for errors.

func GetList

func GetList(err error, args []sxpf.Object, pos int) (*sxpf.List, error)

GetList returns the given argument as a list, and checks for errors.

func GetNumber

func GetNumber(err error, args []sxpf.Object, pos int) (sxpf.Number, error)

GetNumber returns the given argument as a number, and checks for errors.

func GetPair

func GetPair(err error, args []sxpf.Object, pos int) (*sxpf.List, error)

GetPair returns the given argument as a non-nil list, and checks for errors.

func GetSymbol

func GetSymbol(err error, args []sxpf.Object, pos int) (*sxpf.Symbol, error)

GetSymbol returns the given argument as a symbol, and checks for errors.

func ParseExprSeq

func ParseExprSeq(eng *eval.Engine, env sxpf.Environment, args *sxpf.List) (front []eval.Expr, last eval.Expr, _ error)

ParseExprSeq parses a sequence of expressions.

Types

This section is empty.

Directories

Path Synopsis
Package binding contains builtins and syntax to bind values.
Package binding contains builtins and syntax to bind values.
Package boolean contains builtins and syntax for boolean values.
Package boolean contains builtins and syntax for boolean values.
Package callable provides syntaxes and builtins to work with callables / functions / procedure.
Package callable provides syntaxes and builtins to work with callables / functions / procedure.
Package cond provides some special/builtin functions to conditionally evaluate values.
Package cond provides some special/builtin functions to conditionally evaluate values.
Package define contains all syntaxes and builtins to bind values to symbols.
Package define contains all syntaxes and builtins to bind values to symbols.
Package env provides some special/builtin functions to work with environments.
Package env provides some special/builtin functions to work with environments.
Package equiv contains function to test for equivalence of objects.
Package equiv contains function to test for equivalence of objects.
Package list contains all list-related builtins
Package list contains all list-related builtins
Package number contains builtins to work with numbers.
Package number contains builtins to work with numbers.
Package pprint provides some function to pretty-print objects.
Package pprint provides some function to pretty-print objects.
Package quote contains functions to use quotations These are: quote, quasiquote, unquote, unquote-splicing.
Package quote contains functions to use quotations These are: quote, quasiquote, unquote, unquote-splicing.
Package timeit provides functions to measure evaluation.
Package timeit provides functions to measure evaluation.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL