@bitemyapp @puffnfresh
val a = xs map (1 +)
val b = a filter { _ < 10 }
val c = a reduceOption { _ + _ }
val d = c getOrElse 0
d
#fail
-
-
Replying to @djspiewak
@djspiewak@bitemyapp Warning: Defined but not used: `b'1 reply 0 retweets 0 likes -
Replying to @puffnfresh
@puffnfresh@bitemyapp :-) So, naming allows you to group and label chains of computation. Also makes it easier to refactor later.1 reply 1 retweet 0 likes -
Replying to @djspiewak
@djspiewak@bitemyapp now try it without names, will you hit the "defined but not used" problem?1 reply 0 retweets 0 likes -
Replying to @puffnfresh
@puffnfresh@bitemyapp :-) My example was clearly facetious. I was pointing out how *not* to break things up by name.2 replies 0 retweets 0 likes -
Replying to @djspiewak
@djspiewak@puffnfresh It just seems to flow more nicely. The intermediate steps often seem artificial, and forced.1 reply 0 retweets 1 like -
Replying to @propensive
@propensive@puffnfresh Right. I think my point though is that not all computations flow best with anonymous intermediate steps.1 reply 0 retweets 1 like -
Replying to @djspiewak
@djspiewak@propensive@puffnfresh also, you know, LOGGING!2 replies 0 retweets 0 likes -
Replying to @oxbow_lakes
@oxbow_lakes@djspiewak@puffnfresh And debugging.2 replies 0 retweets 0 likes -
Replying to @propensive
@propensive@djspiewak@oxbow_lakes debugging sucks. Let's do less of that :)1 reply 0 retweets 1 like
@puffnfresh @djspiewak @oxbow_lakes Having to debug at line-granularity helps debugging suck more. Daniel's style does mitigate that...
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.