title: kotlin, where the return from inside the let go
body: <pre><code>@kotlin.internal.InlineOnly
  public inline fun &lt;T, R&gt; T.let(block: (T) -&gt; R): R {
      contract {
          callsInPlace(block, InvocationKind.EXACTLY_ONCE)
      }
      return block(this)
  }
  </code></pre>
  
  <p>and have a function like:</p>
  
  <pre><code>fun getType() : String? {
  
       val type = mContent.let {
           if (!TextUtils.isEmpty(it) &amp;&amp; it == "TYPE_1") {
               return "TYPE_A" . //where it returns to, as the result of the let{},  or as return value to exit the fun getType()?
           }
           else {
              return it
           }
       }
  
       if (type == "TYPE_A") {
          return getType_A() 
       } 
  
       return type
  }
  </code></pre>
  
  <p>where does the return inside the block in the let go{}, exit the <code>fun getType()</code> or just return from the <code>let{}</code>?</p>