Is it possible to use an underscore placeholder in some ways it's used in Scala ? #1935
PenghaiZhang
started this conversation in
General
Replies: 1 comment
-
|
Currying can solve this with some caveats (keep things unary and non-optional). |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everybody, I am using both FP-TS and Scala in my project.
I am curious whether we can use an underscore placeholder to make the code a bit more concise.
For example, in Scala an underscore placeholder in an expression is replaced by a anonymous parameter. So:
_ + 1forx => x + 1f(_)forx => f(x)Any ideas guys ?
Beta Was this translation helpful? Give feedback.
All reactions