How would the notation work if you are calling fro...
# language-proposals
a
How would the notation work if you are calling from outside the Matrix class? An equivalent could be
Copy code
class Matrix {
   val transpose by lazy { Transpose() }
   ...
   inner class Transpose {
      ...
   }
}
Transpose still doesn’t really behave like an object though, since it’s tied to another class.
b
Same as any other object, I'd assume:
matrixInstance.Transpose[1,2]
👍 1
k
And sure, that equivalent is just about the code @benleggiero posted earlier.