Functional Programming Constructs

A set of files for treating many operations, like "if", "for", and even "()", as functions.

您现在正在关注此提交

编者注: This file was selected as MATLAB Central Pick of the Week

This set of files enables working more easily with functions of functions for concise and powerful code.
A few highlights of this way of working:

* Map multiple inputs to multiple functions and assign multiple outputs with a single line.

* Use conditionals (like "if"), loops, and recursion in anonymous functions.

A document with derivations and examples of these functions is included. See the readme.txt. Also, each function contains a 'help' entry with examples.

This submission requires strong familiarity with function handles and anonymous functions. If those aren't familiar terms, check the documentation first!

引用格式

Tucker McClure (2026). Functional Programming Constructs (https://ww2.mathworks.cn/matlabcentral/fileexchange/39735-functional-programming-constructs), MATLAB Central File Exchange. 检索时间: .

类别

Help CenterMATLAB Answers 中查找有关 Files and Folders 的更多信息

一般信息

MATLAB 版本兼容性

  • 兼容任何版本

平台兼容性

  • Windows
  • macOS
  • Linux
版本 已发布 发行说明 Action
1.2.0.1

Updated license

1.2.0.0

The 'wrap' function returned all output arguments up to the highest selected. It now "wraps up" only the specifically requested arguments. (Thanks Harald.)

1.1.0.0

Fixed iif to accept function handles for conditions.

1.0.0.0