-
## 概念
- 函数式编程 特点是pure function 纯函数 给定相同输入就一定有相同输出
- 通过高阶函数实现复用
## compose 函数组合
```
概念: c(b(a('......'))) 先执行的是a, b, c
合成: 解决嵌套多层的问题, compose([a, b, c])
```
```javascript
// 同步事件串联起来 …
-
Making a Pushbutton with and `&`
```go
PushButton{Text: "Curry & Banana"}
```
will result in interpreting as the prefix to a shortcut key by default.
https://stackoverflow.com/a/43809221/2…
-
https://github.com/purescript/purescript-effect/blob/master/src/Effect.js#L12
```javascript
return function () {
return f(a())();
};
```
where `f` is a purescript function. Pur…
-
1. https://github.com/keijokapp/purescript-web-cssom-view/blob/3f1ee78d0579673394375886d88f8b0e96f142fc/src/Web/CSSOMView/Element.js#L4
This code checks if value is Just, I was doing like this too,…
-
This line: https://github.com/smartprocure/contexture-react/blob/master/src/exampleTypes/ResultTable.js#L288
Replace the `x => x` with a parameterized default display function. Also pass `field` as…
-
The getX and getY work most of the time. The only time (in my code at least) that they don't work is when I call them from the touch method in another zone... What I implemented was a timeline bar tha…
-
I like the practice of assigning imports to variables that are camel-cased versions of the package name:
``` js
var objectAssign = require('object-assign');
var mapObj = require('map-obj');
```
We'v…
-
### 获取数据类型
#### typeof和instanceof
typeof [] === 'array' // false
1 instanceof Number // false
所以这两种方式获取引用类型都不能一步到位
#### toString
每一个引用类型都有toString方法,默认情况下,如果此方法未被覆写,toString() 返回 "[object type]"…
-
@LoganBarnett
I've been inconsistently running into issues with `__` where flow thinks its presence means the function is actually being invoked. So a simple example:
```js
difference(__, [1,2…
-
## Compiler version
3.0.2
## Minimized code
```Scala
val x: Option[Unit => Int] = None
x.getOrElse(() => 42)()
```
## Output
```
method getOrElse in class Option does not take more …