Documentation ¶
Overview ¶
Package callable provides syntaxes and builtins to work with callables / functions / procedure.
Index ¶
- func Apply(eng *eval.Engine, env sxpf.Environment, args []sxpf.Object) (sxpf.Object, error)
- func CallableP(args []sxpf.Object) (sxpf.Object, error)
- func Fold(eng *eval.Engine, env sxpf.Environment, args []sxpf.Object) (sxpf.Object, error)
- func FoldReverse(eng *eval.Engine, env sxpf.Environment, args []sxpf.Object) (sxpf.Object, error)
- func GetParameterSymbol(params []*sxpf.Symbol, obj sxpf.Object) (*sxpf.Symbol, error)
- func LambdaS(eng *eval.Engine, env sxpf.Environment, args *sxpf.List) (eval.Expr, error)
- func Map(eng *eval.Engine, env sxpf.Environment, args []sxpf.Object) (sxpf.Object, error)
- func ParseProcedure(eng *eval.Engine, env sxpf.Environment, name string, ...) (eval.Expr, error)
- type LambdaExpr
- type Procedure
- func (p *Procedure) Call(eng *eval.Engine, _ sxpf.Environment, args []sxpf.Object) (sxpf.Object, error)
- func (p *Procedure) IsAtom() bool
- func (p *Procedure) IsEql(other sxpf.Object) bool
- func (p *Procedure) IsEqual(other sxpf.Object) bool
- func (p *Procedure) IsNil() bool
- func (p *Procedure) Print(w io.Writer) (int, error)
- func (p *Procedure) Repr() string
- func (p *Procedure) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FoldReverse ¶
FoldReverse will apply the given function reversed pairwise to reversed list of args.
func GetParameterSymbol ¶
Types ¶
type LambdaExpr ¶
type LambdaExpr struct { Name string Params []*sxpf.Symbol Rest *sxpf.Symbol Front []eval.Expr // all expressions, but the last Last eval.Expr }
func (*LambdaExpr) Compute ¶
func (le *LambdaExpr) Compute(eng *eval.Engine, env sxpf.Environment) (sxpf.Object, error)
Click to show internal directories.
Click to hide internal directories.