Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

14
  • $\begingroup$ :) ... it does only work with unassigned variables, though. $\endgroup$ Commented Feb 4, 2014 at 7:37
  • $\begingroup$ Yes, it was meant as a goof. Adding my real entry now... $\endgroup$ Commented Feb 4, 2014 at 8:58
  • 1
    $\begingroup$ This is the approach I wanted to take, but I couldn't see a fast way to compute pres. The Accumulate trick is very clever. Excellent work! $\endgroup$ Commented Feb 4, 2014 at 10:07
  • $\begingroup$ @SimonWoods: Appreciate the comment! Yes, as I commented to Mr.W, I was scratching around for a bit on that. I think there's more tweaking ;-) $\endgroup$ Commented Feb 4, 2014 at 10:36
  • $\begingroup$ Regarding the last point, that the Map is the slowest part, you can save some time by doing ss[[Flatten@pres]] ~Partition~ Length[ss] instead $\endgroup$ Commented Feb 4, 2014 at 11:38