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*

6
  • 2
    $\begingroup$ @halirutan Nice. $\endgroup$ Commented Aug 14, 2013 at 3:20
  • $\begingroup$ Adding to the nerdiness, can we make unflatten into a nestedRotate by setting f[_] := l1[[++i /. Length@l1 + 1 -> 1]]; or something similar? $\endgroup$ Commented Aug 14, 2013 at 16:31
  • $\begingroup$ A memory / symbol leak has been discovered for your code - which is otherwise very neat and elegant, here. Perhaps, it is a good idea to update to one of the alternatives posted there, or some other one? $\endgroup$ Commented Apr 3, 2014 at 17:45
  • 1
    $\begingroup$ @halirutan Welcome :) Actually, the minimal change would've been just using SetAttributes[f, Listable] in place of Attributes[f]={Listable}, but of course there are many ways, as usual in M. $\endgroup$ Commented Apr 4, 2014 at 10:46
  • 1
    $\begingroup$ (Just to put it here, too) The reason f leaks is that you've destroyed the Temporary attribute $\endgroup$ Commented Apr 14, 2020 at 7:23