#scala
You can construct a function that delegates to a method via η-expansion (triggered by the trailing underscore thingy).
If you want to change selection, open document below and click on "Move attachment"
tpolecatout that there are a lot of cases to consider. It would be nice if this could just be the last word on methods vs. functions in Scala, so if I missed anything please let me know.
TL;DR ... Methods in Scala are not values, but functions are. <span>You can construct a function that delegates to a method via η-expansion (triggered by the trailing underscore thingy).
The definition I will be using here is that a method is something defined with def and a value is something you can assign to a val.
The Basic Idea
When we define a method we see that Summary
status | not read | | reprioritisations | |
---|
last reprioritisation on | | | suggested re-reading day | |
---|
started reading on | | | finished reading on | |
---|
Details