Skip to main content

Mathematica's functional programming features allow users to treat functions as expressions in the same way that data are expressions. This functionality is usually more efficient than the use of Do and For loops that are more familiar to users of procedural programming languages like C or Fortran. By using dedicated built-in Mathematica functions and pure functions, one can write code where the output of a function is set to be the direct input of a next function, without ever introducing temporary variables at all.

An important part of this functionality is the use of pure functions, known in some other languages as "anonymous functions". These are usually distinguishable through their use of Function (&) and the (optional) accompanying use of Slot (#) and/or SlotSequence (##), in place of arguments.

Questions on how to use and construct functions should use the tag .

Useful links:

Mathematica's functional programming features allow users to treat functions as expressions in the same way that data are expressions. This functionality is usually more efficient than the use of Do and For loops that are more familiar to users of procedural programming languages like C or Fortran. By using dedicated built-in Mathematica functions and pure functions, one can write code where the output of a function is set to be the direct input of a next function, without ever introducing temporary variables at all.

An important part of this functionality is the use of pure functions, known in some other languages as "anonymous functions". These are usually distinguishable through their use of Function (&) and the (optional) accompanying use of Slot (#) and/or SlotSequence (##), in place of arguments.

Questions on how to use and construct functions should use the tag .

Useful links:

Mathematica's functional programming features allow users to treat functions as expressions in the same way that data are expressions. This functionality is usually more efficient than the use of Do and For loops that are more familiar to users of procedural programming languages like C or Fortran. By using dedicated built-in Mathematica functions and pure functions, one can write code where the output of a function is set to be the direct input of a next function, without ever introducing temporary variables at all.

An important part of this functionality is the use of pure functions, known in some other languages as "anonymous functions". These are usually distinguishable through their use of Function (&) and the (optional) accompanying use of Slot (#) and/or SlotSequence (##), in place of arguments.

Questions on how to use and construct functions should use the tag .

Useful links:

added 60 characters in body; added 127 characters in body
Source Link
István Zachar
  • 47.2k
  • 20
  • 145
  • 293

General information

Mathematica's functional programming features allow users to treat functions as expressions in the same way that data are expressions. This functionality is usually more efficient than the use of Do[]Do and For[]For loops that are more familiar to users of procedural programming languages like C or Fortran. By using dedicated built-in Mathematica functions and pure functions, one can write code where the output of a function is set to be the direct input of a next function, without ever introducing temporary variables at all.

An important part of this functionality is the use of pure functions, known in some other languages as "anonymous functions". These are usually distinguishable through their use of Function[]Function (&) and the (optional) accompanying use of Slot (#) and/or SlotSequence (##), in place of arguments.

##Useful linksQuestions on how to use and construct functions should use the tag .

Useful links:

General information

Mathematica's functional programming features allow users to treat functions as expressions in the same way that data are expressions. This functionality is usually more efficient than the use of Do[] and For[] loops that are more familiar to users of procedural programming languages like C or Fortran. By using dedicated built-in Mathematica functions and pure functions, one can write code where the output of a function is set to be the direct input of a next function, without ever introducing temporary variables at all.

An important part of this functionality is the use of pure functions, known in some other languages as "anonymous functions". These are usually distinguishable through their use of Function[] (&) and the (optional) accompanying use of Slot (#) and/or SlotSequence (##), in place of arguments.

##Useful links

Mathematica's functional programming features allow users to treat functions as expressions in the same way that data are expressions. This functionality is usually more efficient than the use of Do and For loops that are more familiar to users of procedural programming languages like C or Fortran. By using dedicated built-in Mathematica functions and pure functions, one can write code where the output of a function is set to be the direct input of a next function, without ever introducing temporary variables at all.

An important part of this functionality is the use of pure functions, known in some other languages as "anonymous functions". These are usually distinguishable through their use of Function (&) and the (optional) accompanying use of Slot (#) and/or SlotSequence (##), in place of arguments.

Questions on how to use and construct functions should use the tag .

Useful links:

added 27 characters in body
Source Link

General information

Mathematica's functional programming features allow users to treat functions as expressions in the same way that data are expressions. This functionality is usually more efficient than the use of DoDo[] and ForFor[] loops that are more familiar to users of procedural programming languages like C or Fortran. By using dedicated built-in Mathematica functions and pure functions, one can write code where the output of a function is set to be the direct input of a next function, without ever introducing temporary variables at all.

An important part of this functionality is the use of pure functions, known in some other languages as "anonymous functions". These are usually distinguishable through their use of FunctionFunction[] (&) and the (optional) accompanying use of Slot (#) and/or SlotSequence (##), standing forin place of arguments.

##Useful links

General information

Mathematica's functional programming features allow users to treat functions as expressions in the same way that data are expressions. This functionality is usually more efficient than Do and For loops that are more familiar to users of procedural programming languages like C or Fortran. By using dedicated built-in Mathematica functions and pure functions, one can write code where the output of a function is set to be the direct input of a next function, without ever introducing variables at all.

An important part of this functionality is the use of pure functions, known in some other languages as "anonymous functions". These are usually distinguishable through their use of Function (&) and the (optional) accompanying use of Slot (#) and SlotSequence (##), standing for arguments.

##Useful links

General information

Mathematica's functional programming features allow users to treat functions as expressions in the same way that data are expressions. This functionality is usually more efficient than the use of Do[] and For[] loops that are more familiar to users of procedural programming languages like C or Fortran. By using dedicated built-in Mathematica functions and pure functions, one can write code where the output of a function is set to be the direct input of a next function, without ever introducing temporary variables at all.

An important part of this functionality is the use of pure functions, known in some other languages as "anonymous functions". These are usually distinguishable through their use of Function[] (&) and the (optional) accompanying use of Slot (#) and/or SlotSequence (##), in place of arguments.

##Useful links

Added Function (&), as it is THE specification of a pure function and not slots (#).
Source Link
István Zachar
  • 47.2k
  • 20
  • 145
  • 293
Loading
Link
Loading