You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -946,7 +946,7 @@ times(3)(console.log)
946
946
// 3
947
947
// 2
948
948
// 1
949
-
times(-1)(console.log)
949
+
times(-1)(console.log)
950
950
// RangeError: Maximum call stack size exceeded
951
951
```
952
952
### Avoiding partial functions
@@ -980,7 +980,7 @@ times(3)(console.log)
980
980
// 3
981
981
// 2
982
982
// 1
983
-
times(-1)(console.log)
983
+
times(-1)(console.log)
984
984
// won't execute anything
985
985
```
986
986
If you will change all your functions from partial to total, it can prevent you from having runtime exceptions, will make code easier to reason about and easier to maintain.
0 commit comments