Javascript 中的函数式编程
来自 间歇性习得 & 介绍性文字 & 发现 - Javascript 中的文章
函数式编程(Functional Programming,FP)是一种编程范式(或者说构建程序的风格),它的主要想法是像数学演算(起源于 calculus)一样去实现计算而避免改变数据状态;怎么理解这一点呢?比如对于洛伦兹变换:...
string
与一个 object
为参数,返回一个经过处理的 string
.比较直观的例子:// stringvar tpl = '<p> The boy out there is {{ name }}, and his is {{ age }} </p>';// objectvar data = { name: 'Mellon', age: 10};// (magic process)Template(tpl, data); // return '<p> The boy out there is Mellon, and his is 10 </p>'
...Structure
),它可能需要包含:类型 | 边 | 允许多重边 | 允许环 |
---|---|---|---|
简单图 | 无向 | 否 | 否 |
多重图 | 无向 | 是 | 否 |
伪图 | 无向 | 是 | 是 |
有向图 | 有向 | 否 | 是 |
有向多重图 | 有向 | 是 | 是 |
混合图 | 有向和无向 | 是 | 是 |
brew install watchman
brew install flow
npm install -g react-native-cli
git clone https://github.com/creationix/nvm
cd nvm
source nvm.sh