@ryanlecompte @jedws mapValues is only available on Map. It’s also VERY broken. Don’t use it if you care about performance (or correctness).
-
-
Replying to @djspiewak
@djspiewak@ryanlecompte what correctness issues do you have? I can see that the laziness may be a prob if recomputing values all the time…2 replies 0 retweets 0 likes -
Replying to @jedws
@jedws@ryanlecompte Recomputation *is* a correctness issue in an impure language.1 reply 0 retweets 0 likes -
Replying to @djspiewak
@djspiewak@ryanlecompte oh, the dickhead problem… solved by a large cricket bat!2 replies 0 retweets 0 likes -
-
Replying to @djspiewak
@djspiewak@ryanlecompte indeed. but it is somewhat pessimistic though… any function in any impure language has the same problem1 reply 0 retweets 0 likes -
Replying to @jedws
@jedws@ryanlecompte Yes, but mapValues is not expected to be lazy, and thus the fact that it’s a function is unexpected.1 reply 0 retweets 0 likes -
Replying to @djspiewak
@djspiewak@ryanlecompte why do you not expect it to be lazy? why does it matter? (in the sense that a program should not care)3 replies 0 retweets 0 likes -
Replying to @jedws
@jedws@ryanlecompte I don’t expect it to be lazy since none of the other functions on *eager* Maps are lazy (most notably, map).1 reply 0 retweets 0 likes -
Replying to @djspiewak
@djspiewak@ryanlecompte consistency then. it does document its laziness.4 replies 0 retweets 1 like
@jedws @djspiewak @ryanlecompte Laziness is as unsafe as anything else in scala. There is no correctness issue.
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.