- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
(Set[K], Function1[K,V]) => Map[K,V]
Could not find such a constructor... does it exist? Should not it exist? (I believe it should.)
--
Thanks,
-Vlad
--
Thanks,
-Vlad
Copyright © 2013 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland
Re: (Set[K], Function1[K,V]) => Map[K,V]
scala> import scala.collection.breakOut
import scala.collection.breakOut
scala> val s = Set(1, 2, 3)
s: scala.collection.immutable.Set[Int] = Set(1, 2, 3)
scala> val m: Map[Int, Int] = s.map(k => (k, k * 10))(breakOut)
m: Map[Int,Int] = Map((1,10), (2,20), (3,30))
- Colin
Re: (Set[K], Function1[K,V]) => Map[K,V]
2010/6/15 Colin Bullock <cmbullock [at] gmail [dot] com>
Re: (Set[K], Function1[K,V]) => Map[K,V]
>>>>> "Dimitris" == Dimitris Andreou writes:
Dimitris> Anyone cares to put few more words around breakOut and betray
Dimitris> perhaps its meaning? :)
http://stackoverflow.com/questions/1715681/scala-2-8-breakout
Re: (Set[K], Function1[K,V]) => Map[K,V]
2010/6/15 Seth Tisue <seth [at] tisue [dot] net>
Re: (Set[K], Function1[K,V]) => Map[K,V]
On 15 June 2010 15:13, Seth Tisue <seth [at] tisue [dot] net> wrote:
--
Kevin Wright
mail/google talk: kev [dot] lee [dot] wright [at] gmail [dot] com
wave: kev [dot] lee [dot] wright [at] googlewave [dot] com
skype: kev.lee.wright
twitter: @thecoda
Re: (Set[K], Function1[K,V]) => Map[K,V]
for what it's worth :)
On 15 June 2010 15:05, Dimitris Andreou <jim [dot] andreou [at] gmail [dot] com> wrote:
--
Kevin Wright
mail/google talk: kev [dot] lee [dot] wright [at] gmail [dot] com
wave: kev [dot] lee [dot] wright [at] googlewave [dot] com
skype: kev.lee.wright
twitter: @thecoda