Skip to content

Instantly share code, notes, and snippets.

@thobson
Created October 24, 2017 18:27
Show Gist options
  • Save thobson/f9655d2f303c9d4c4191dc7473904f97 to your computer and use it in GitHub Desktop.
Save thobson/f9655d2f303c9d4c4191dc7473904f97 to your computer and use it in GitHub Desktop.
implicit val vehicleLikeCar = ...
implicit val vehicleLikeBus = ...
def driveAndReturn[A](vehicle: A)(implicit vehicleLike: VehicleLike[A]): A = {
println(vehicleLike.drive(vehicle)); vehicle
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment