Switched type equality to a function

Yo.

I hope this makes sense.

Let me know if it needs improvement.


Can you document this? How about something like this (please feel free to tweak for correctness):

> The identity function, which can be used to prove to the typechecker that a given type A is equivalent to a given type B.
>
> For example, the following global function is normally impossible to bring into the `Stream<T>` class:
>
>    func flatten<U>(stream: Stream<Stream<U>>) -> Stream<U>
>
> However, it can be made an instance method with an “evidence” parameter:
>
>    func flatten<U>(evidence: Stream<T> -> Stream<Stream<U>>) -> Stream<U>
>
> And then invoked with the identity function like this:
>
>    stream.flatten(identity)
>
> This will verify that `stream`, which is nominally `Stream<T>`, is logically equivalent to `Stream<Stream<U>>`. If that's not actually the case, a type error will result.