GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • WOLFRAM
  • Products
  • AI AccessUse with Mathematica and Wolfram|One
  • Finance Platform
  • Wolfram|Alpha Notebook Edition
  • Application Server
  • Enterprise Private Cloud
  • Wolfram Engine
  • Wolfram Player
  • Wolfram Cloud App
  • Wolfram Player App
  • Wolfram|Alpha Website
  • Wolfram|Alpha APIs
  • Wolfram AI Ecosystem

This view

  • Original page
  • New address

GeezerVison is showing reference.wolfram.com — Functional Programming—Wolfram Documentation

Functional Programming

Functional programming is a highly developed and deeply integrated core feature of the Wolfram Language, made dramatically richer and more convenient through the symbolic nature of the language. Treating expressions like f[x] as both symbolic data and the application of a function f provides a uniquely powerful way to integrate structure and function—and an efficient, elegant representation of many common computations.

Function (&) — specify a pure function (e.g. (#+1)&)

#, ##, #name — slots for variables in a pure function

Applying Functions to Lists »

Map (/@) — map across a list: f/@{x,y,z}⟶{f[x],f[y],f[z]}

Apply (@@) — apply to a list: f@@{x,y,z}⟶f[x,y,z]

MapApply (@@@) — apply to a list: f@@@{x,y,z}⟶{f@@x,f@@y,f@@z}

MapIndexed — map with index information: {f[x,{1}],f[y,{2}],f[z,{3}]}

MapThread  ▪  MapAt  ▪  MapAll  ▪  Scan  ▪  BlockMap  ▪  SubsetMap  ▪  ...

Applying Lists of Functions to Arguments

Comap — comap into a list: Comap[{f,g,h},x]⟶{f[x],g[x],h[x]}

ComapApply — use multivariate heads: ComapApply[{f,g,…},x]⟶{f@@x,g@@x,…}

Iteratively Applying Functions »

Nest, NestList, NestGraph — nest a function: f[f[f[x]]] etc.

Fold, FoldList — fold in a list of values: f[f[f[x,1],2],3] etc.

SequenceFold  ▪  SequenceFoldList  ▪  FoldPair  ▪  FoldWhile  ▪  ...

FixedPoint, FixedPointList — repeatedly nest until a fixed point

NestWhile  ▪  NestWhileList  ▪  TakeWhile  ▪  LengthWhile  ▪  ...

List-Oriented Functions »

Select — select from a list according to a function

Array — create an array from a function

SortBy  ▪  MaximalBy  ▪  SplitBy  ▪  GatherBy  ▪  ...

Association-Oriented Functions »

AssociationMap — create an association from a function

KeySortBy  ▪  CountsBy  ▪  GroupBy  ▪  ...

Functional Composition »

Identity  ▪  Composition  ▪  ReverseApplied  ▪  Operate  ▪  Through  ▪  ...

"Curried" Operator Forms »

OperatorApplied — make a function be applied in operator form

CurryApplied  ▪  Select  ▪  Cases  ▪  Append  ▪  Map  ▪  Position  ▪  ...

Related Tech Notes

    ▪
  • Pure Functions
  • ▪
  • Variables in Pure Functions and Rules
  • ▪
  • Applying Functions to Lists and Other Expressions
  • ▪
  • Applying Functions to Parts of Expressions
  • ▪
  • Applying Functions Repeatedly
  • ▪
  • Selecting Parts of Expressions with Functions
  • ▪
  • Working with Operators

Related Guides

    ▪
  • List Manipulation
  • ▪
  • Rule-Based Programming
  • ▪
  • Expressions
Top
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.