add swift implementation

Swift!
Signed-off-by: Andre Dublin <81dublin@gmail.com>
Could you get away with Trial being a tuple? Is it possible to `typealias` that? It might cut some lines out.