title: Difference between computed property and property set with closure
body: <p>I'm new to Swift.  What is the difference between a computed property and a property set to a closure?  I know a computed property gets recalculated each time.  Is it different for the closure? i.e.</p>
  
  <p><strong>Closure:</strong></p>
  
  <pre><code>var pushBehavior: UIPushBehavior = {
      let lazilyCreatedPush = UIPushBehavior()
      lazilyCreatedPush.setAngle(50, magnitude: 50)
      return lazilyCreatedPush
  }()
  </code></pre>
  
  <p><strong>Computed:</strong></p>
  
  <pre><code>var pushBehavior: UIPushBehavior {
      get{
          let lazilyCreatedPush = UIPushBehavior()
          lazilyCreatedPush.setAngle(50, magnitude: 50)
          return lazilyCreatedPush
      }
  }
  </code></pre>