title: In Swift 5, what is a way to compare pointers to two closures?
body: <p>In Swift 5, what is a way to compare pointers to two closures?</p>
  <p>I was told here
  <a href="https://stackoverflow.com/questions/45270371/in-swift-3-what-is-a-way-to-compare-two-closures">In Swift 3, what is a way to compare two closures?</a></p>
  <p>that this is somehow a different question.
  So now you have it.</p>
  <pre><code>public typealias Action = () -&gt; Void
  
  let action1: Action = {}
  let action2: Action = {}
  
  assert(action1 == action1)
  assert(action1 != action2)
  </code></pre>