Home > Mobile >  How do I convert lambda form into the lambda form?
How do I convert lambda form into the lambda form?

Time:04-23

I am a beginner, grammar is not skilled, encounter lambda expressions often affect my reading code process of logical thinking,
I would like to ask the android studio or other IDE, how to set up that I can convert lambda form into the lambda form? Thank you very much!

The following code, for example, I don't understand, I understand it, the class name at the back of the content is the constructor, brackets, clickListener is the attribute name, colon (sleepId: Long) - & gt; Unit is the attribute types, but, why such a strange type, the middle - & gt; Symbols represent what mean?
If this code into the form of the lambda, should be what kind of? Thank you very much!
 
The class SleepNightListener (val clickListener: (sleepId: Long) - & gt; The Unit) {
Fun onClick (night: SleepNight)=clickListener (night. NightId)
}
  • Related