Join Slack
Communities
Powered by
you can use a reference to a constructor as a func...
# announcements
n
natpryce
02/16/2016, 2:41 PM
you can use a reference to a constructor as a function. Eg. if I have a
class Banana(val ripeness: Double) { … }
, then I can use the expression
::Banana
to get a function that creates a Banana instance given a ripeness.
Open in Slack
Previous
Next