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*

5
  • 2
    $\begingroup$ Using TracePrint[] on your third input in your last bit is rather telling... for that matter, try TracePrint[f[n_Integer]] after your second input and watch the growth from f[n_Integer] to f[{}, n_Integer] to f[{}, {}, n_Integer] to... $\endgroup$ Commented Jan 19, 2012 at 18:00
  • 1
    $\begingroup$ On the other hand, if you use f[x__Real] := {x} (i.e. BlankSequence instead of BlankNullSequence), you don't bump into the problem. $\endgroup$ Commented Jan 19, 2012 at 18:08
  • $\begingroup$ N.B. One doesn't need to do a kernel restart when trying out each code blob. Just precede each code blob with Remove[f, g] for a clean evaluation. $\endgroup$ Commented Jan 19, 2012 at 18:11
  • 1
    $\begingroup$ If you're going to play around with TracePrint[], you probably would want to lower your value of $IterationLimit to a small integer, say 20. For instance: Block[{$IterationLimit = 20}, TracePrint[f[n_Integer]]]. $\endgroup$ Commented Jan 19, 2012 at 18:14
  • $\begingroup$ @J.M.: Actually for my tests I used "Notebook's Default Context → Unique to Each Cell Group" and just started a new section for each test. $\endgroup$ Commented Jan 19, 2012 at 18:17