Maple Professionel
Maple Académique
Maple Edition Étudiant
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professionel
MapleSim Académique
Maple T.A. - Suite d'examens de classement
Maple T.A. MAA Placement Test Suite
Möbius - Didacticiels de mathématiques en ligne
Machine Design / Industrial Automation
Aéronautique
Ingénierie des véhicules
Robotics
Energie
System Simulation and Analysis
Model development for HIL
Modélisation du procédé pour la conception de systèmes de contrôle
Robotics/Motion Control/Mechatronics
Other Application Areas
Enseignement des mathématiques
Enseignement de l’ingénierie
Enseignement secondaire et supérieur (CPGE, BTS)
Tests et évaluations
Etudiants
Modélisation financière
Recherche opérationnelle
Calcul haute performance
Physique
Webinaires en direct
Webinaires enregistrés
Agenda des évènements
Forum MaplePrimes
Blog Maplesoft
Membres Maplesoft
Maple Ambassador Program
MapleCloud
Livres blancs techniques
Bulletin électronique
Livres Maple
Math Matters
Portail des applications
Galerie de modèles MapleSim
Cas d'Etudes Utilisateur
Exploring Engineering Fundamentals
Concepts d’enseignement avec Maple
Centre d’accueil utilisateur Maplesoft
Centre de ressources pour enseignants
Centre d’assistance aux étudiants
Functions
Calling Sequence
expr(expseq)
Description
This help page describes the Maple function expression. A "function" expression represents a function call, or application of a function or procedure to arguments. For a list of mathematical functions defined in Maple, see initial functions. A mathematical function can be defined in Maple using a functional operator. Use these to define a function of a single variable, a multivariate function, or a vector function.
In Maple, a "function" expression represents a function call, or application of a function or procedure to arguments. Such an expression is said to be of type function. A "typical" example of an expression of type function is the expression , which represents the application of the expression to the argument sequence . Note that, in this expression, we refer to the entire expression as being of type function (that is, a "function call" or "function application"), while the expression is typically not itself of type function (but often is of type procedure).
The operands of a function expression are the "arguments". For example, the operands of the expression are , and . The expression may be extracted from this expression as the zero-th operand. See the examples section below for more about this.
In an expression of type function, the applied expression is often a Maple procedure, or a name that evaluates to a procedure. In this case, evaluating the expression causes the procedure (or to which evaluates) to be applied to the arguments (see Argument Processing), and the result of evaluating the expression is the value returned by the procedure. However, the expression need not be a procedure, or even evaluate to one.
Apart from procedure applications, one of the most useful applications of function expressions is the ability to use them to define abstract data types. This application makes use of Maple's ability to manipulate unevaluated function calls easily and naturally.
Function expressions may be created using the constructor apply.
Assignments to unevaluated function calls can create procedures. When you assign a value to the function expression , in which is an unassigned name, a procedure is created and assigned to which returns unevaluated for all argument sequences other than and returns the value assigned when passed the argument . The value of the expression is stored in the remember table of the newly created procedure. Subsequent assignments to unevaluated calls to further populate this remember table.
In the case when is a constant, there are some differences in how is parsed in 1-D and 2-D input modes. For example, in 1-D input is a function application, but in 2-D by default this means multiplication. For more information, including how to change this default behavior, see 2DMathDetails.
Examples
Two ways to apply sin to :
The next command, entered two ways, returns unevaluated.
type( 'proc(x) 1+x; end( 2 )', 'function' );
Assign to this function expression.
Now is assigned a procedure with a remember table.
Add more entries to the remember table.
See Also
apply, Argument Processing, functional operators, index of functions, initial functions, op, operator, procedure, type, type/function
Download Help Document