Create generic Scala collections with CanBuildFrom http://www.michaelpollmeier.com/create-generic-scala-collections-with-canbuildfrom/ … #Scala #Blog
-
-
Replying to @pollmeier
@pollmeier@ryanlecompte what about map on structures that are not Iterable, or even nothing like collections at all?1 reply 0 retweets 0 likes -
Replying to @dibblego
@dibblego@ryanlecompte well all you need is the CanBuildFrom factory. No need for Iterable or anything collection like ;)1 reply 0 retweets 0 likes -
Replying to @pollmeier
@pollmeier@ryanlecompte but then I must implement methods that are not sensible for my "thing with map."1 reply 0 retweets 0 likes -
Replying to @dibblego
@dibblego@ryanlecompte all you need to implement is CanBuildFrom, which essentially needs a new Builder. looks quite sensible to me...2 replies 0 retweets 0 likes
Replying to @pollmeier
@pollmeier @ryanlecompte take a look at the signature to Function1#andThen some time. Look familiar?
2:07 AM - 20 Aug 2013
0 replies
0 retweets
0 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.