4 ms·
I haven't used kotlin, but where is length defined? Should it be a parameter to the function?
by mjcohen 6y ago
I haven't used kotlin, but where is length defined? Should it be a parameter to the function?
- pirocks 6y agoThe above is an extension function(which is basically a member function of class not written in that class), which has an implicit `this` parameter. In other words `length` is actually `this.length`, just as it would be in a regular method.