skip to main
|
skip to sidebar
Andy's Scala notes
Thursday, 28 May 2009
Comparable anonymous types
Defining a function that takes an Anonymous type that can be compared.
Here we have 't' of type 'U' that can be '<' or '>'
def addValue[U > : T < % Ordered[U]](t: U) =
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
Nuclear Carrot - Andy's website
Labels
actors
(1)
anonymous type
(1)
cast
(1)
functions
(5)
implicits
(1)
instanceOf
(1)
lift
(1)
links
(2)
list
(4)
loop
(3)
map
(1)
option[T]
(1)
string
(2)
tuples
(1)
xml
(1)
No comments:
Post a Comment