Sounds great Mark! I think it is not far from writing Fibonacci <https://en.wikipedia.org/wiki/Fibonacci_number> sequence in Tiddlywiki :-)
--Mohammad On Thursday, October 17, 2019 at 7:53:27 PM UTC+3:30, Mark S. wrote: > > This does literally what you asked for, though I'm not sure that's what > you meant: > > \define recurseme(yourvar,count) > <$list filter="[<__count__>!regexp[^0$]]" emptyMessage="TOO MANY > RECURSIONS!" > > I'm doing important things here! <br/> > <$set name="count" filter="[<__count__>subtract[1]]" select=0> > <$macrocall $name=recurseme yourvar="Stuff" count=<<count>>/> > </$set> > </$list> > \end > > <<recurseme "more" "5">> > > Put your own code where it says "I'm doing important stuff here." (Be sure > to back up first). > > Good luck! > > On Wednesday, October 16, 2019 at 4:07:03 PM UTC-7, Jan wrote: >> >> Hello, >> want to show the title of a chain of tiddlers which mention the next on >> in a field called thread. >> This works fine like this >> >> \define plotchain() >> <$set name="chain" value="JJ/Das merkwürdige Tier"> >> $(chain)$ >> <<reku>> >> </$set> >> \end >> \define chainer() [[$(chain)$]] >> \define reku() >> <$list filter="[list[$(chain)$!!thread]] [list[$(chain)$!!storylink]]" >> variable="chain"> >> <<chainer>> >> <<reku>> >> </$list> >> \end >> >> <$vars chain="JJ/Das merkwürdige Tier"> >> <<chainer>> >> <<reku>> >> </$vars> >> >> But if someone builds a cirle this crashes the wiki. >> Is there a way of limiting recursions e.g. by using a filter with >> math-operators? >> >> Thanks! >> Jan >> >> >> -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/39a1cfd1-8965-45b0-8df2-b32c083982f0%40googlegroups.com.

