Skip to content

Instantly share code, notes, and snippets.

@Krasnyanskiy
Created October 17, 2015 20:47
Show Gist options
  • Save Krasnyanskiy/89776235d1e8f470b404 to your computer and use it in GitHub Desktop.
Save Krasnyanskiy/89776235d1e8f470b404 to your computer and use it in GitHub Desktop.
def f[A: B, C](a: A)
class B
@Krasnyanskiy
Copy link
Author

It is just a simple shorthand for

def f[A, C](a: A)(implicit ev: B[A])

You can also consider it as a context bound. In our case the context is ev and its type is B, which was bounded by A.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment