Created
May 5, 2011 01:15
-
-
Save jakedouglas/956345 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// How do I make the 'f' function parameterized by the type of the implicit? | |
def cas[T](key: Array[Byte], | |
ttl: Int = 0) | |
(f: Option[T] => Option[T]) | |
(implicit transcoder: Transcoder[T] = defaultTranscoder): Boolean = { ... } | |
// trying to compile this usage fails. would like to avoid using c.cas[SomeType](key) | |
c.cas(key) { value => ... } | |
// [error] missing parameter type | |
// [error] Error occurred in an application involving default arguments. | |
// [error] c.cas(key) { value => | |
// [error] ^ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment