Top
Back: proc declaration
Forward: procs with different argument types
FastBack: poly
FastForward: resolution
Up: proc
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

4.18.2 proc expression

Syntax:
variable_name -> { expression(s) }
Purpose:
Defines a new function, within apply or for assigning.
Example:
 
  apply(1..3,x->{x**2});
==> 1 4 9
  proc t=x->{x mod 5};
  t;
==> // libname  : 
==> // procname : x->x mod 5
==> // type     : singular
  t(23);
==> 3
  proc p=t;

See apply; proc.


Top Back: proc declaration Forward: procs with different argument types FastBack: poly FastForward: resolution Up: proc Top: Singular Manual Contents: Table of Contents Index: Index About: About this document
            User manual for Singular version 4.4.1, 2025, generated by texi2html.