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
Functional programming may be able to solve the issue of fat-arrow functions in v2.
The issue with the fat-arrow function is that it can only process one statement.
One suggestion to solve this issue is to run multiple expressions with commas, as follows.
f := () => (
a(),
b(),
c()
)
However, this method is a bit inconvenient because you cannot use if statements, and if you forget to remove the comma at the end of the expression, an error will occur.
The following is the current solution with reference to functional programming.
Functional programming may be able to solve the issue of fat-arrow functions in v2.
The issue with the fat-arrow function is that it can only process one statement.
One suggestion to solve this issue is to run multiple expressions with commas, as follows.
However, this method is a bit inconvenient because you cannot use if statements, and if you forget to remove the comma at the end of the expression, an error will occur.
The following is the current solution with reference to functional programming.
; 2.0-beta.1 f := bee.from() .pipe(() => a()) .pipe(() => b()) .pipe(() => c()) )
If you want to use an if or loop statement, do the following
Functional programming can be useful not only for solving fat-arrow function issue, but also for general data processing.
The text was updated successfully, but these errors were encountered: