# 함수형 프로그래밍

고차 함수 및 기타 함수형 프로그래밍 유틸리티

### 참고

MuPAD® Notebook은 향후 릴리스에서 제거될 예정입니다. MATLAB® 라이브 스크립트를 대신 사용하십시오.

MuPAD Notebook 파일을 MATLAB 라이브 스크립트 파일로 변환하려면 `convertMuPADNotebook`을 참조하십시오. MATLAB 라이브 스크립트는 일부 차이는 있지만 대부분의 MuPAD 기능을 지원합니다. 자세한 내용은 MuPAD Notebook을 MATLAB 라이브 스크립트로 변환하기 항목을 참조하십시오.

 `@` Compose functions `@@` Iterate a function `copyClosure` Copies the lexical closure of a procedure `discont` Discontinuities of a function `funcenv` Create a function environment `map` Apply a function to all operands of an object `maprat` Apply a function to a rationalized expression `operator` Define a new operator symbol
 `fp::apply` Apply function to arguments `fp::bottom` Function that never returns `fp::curry` Curry an n-ary function `fp::expr_unapply` Create a functional expression from an expression `fp::fixargs` Create function by fixing all but one argument `fp::fixedpt` Returns fixed point of a function `fp::fold` Create function which iterates over sequences `fp::nest` Repeated composition of function `fp::nestvals` Repeated composition returning intermediate values `fp::unapply` Create a procedure from an expression
 `misc::breakmap` Stops the mapping currently done by maprec `misc::maprec` Map a function to subexpressions of an expression
 `Pref::typeCheck` Type checking of formal parameters `Pref::warnDeadProcEnv` Warnings about wrong usage of lexical scope
 `prog::getname` Name of an object `prog::getOptions` Get and verify options within a procedure `prog::isGlobal` Information about reserved identifiers

## 예제 및 방법

Access Arguments of a Procedure

The terms parameters and arguments are often used interchangeably.

Test Arguments

When writing a MuPAD procedure, you can specify the type of arguments accepted by the procedure.

Verify Options

For many standard MuPAD procedures, you can use different options.

Data Collection

Suppose the data that you want to collect is generated element-by-element and you know in advance how many elements will be generated.

Variables Inside Procedures

When you call a procedure, MuPAD allocates memory for the local variables, marks them as uninitialized, and evaluates the body of the procedure.

Utility Functions

You can define utility functions inside a procedure.

Private Methods

Create private methods by using closures.

Calls by Reference and Calls by Value

When calling a procedure with some arguments, you expect the procedure to assign these values for its local variables and perform some computations with those variables.

## 개념

Functional Programming

Use only in the MuPAD Notebook Interface.

The misc Library

Use only in the MuPAD Notebook Interface.

#### Mathematical Modeling with Symbolic Math Toolbox

Get examples and videos