Skip to content

Commit 4163453

Browse files
committed
Add uncurried function misc docs
1 parent 77b0a27 commit 4163453

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
test: "foo"
3+
---
4+
5+
The `(.) => { ... }` (uncurried) syntax defines a function type that is not curried by default. This is useful whenever you want to make sure that your function is not being curried unintentionally, or if you want to force the compiler to emit cleaner JS source code (JS doesn't have curried functions by default).
6+
7+
```res
8+
let myFn = (cb: (. int) => unit) => {
9+
cb(. 1)
10+
}
11+
```

0 commit comments

Comments
 (0)