Phantom types are special types in Swift. They are useful when you want to pass the variable with same structure but with different types. I would like to thank to This blog post for inspiring me to write this post. Also examples mentioned in the post are inspired by the