|
Singleton sets: msg#00404lang.scala
What's the canonical equivalent of java.util.Collections.singleton() in Scala? The obvious candidate appears to be, Set(e) ie. scala.collection.immutable.Set.apply(e) but enfortunately the element type A is view-bounded by Ordered[A] so this fails for for elements of non-Ordered types. Is this intentional? the bound doesn't appear to be doing any useful work here. Cheers, Miles |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Another nit: 00404, Imam Tashdid ul Alam |
|---|---|
| Next by Date: | Re: Another nit: 00404, Isaac Gouy |
| Previous by Thread: | How do I pattern match the followingi: 00404, David Pollak |
| Next by Thread: | Re: Singleton sets: 00404, martin odersky |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |