Hi Mark! This is amazing! Fibonacci sequence code is among the benchmark code to show how efficient a language support the recursive operation. This code shows Tiddlywiki scripting language is powerful and of course shows your talent :-)
--Mohammad On Friday, October 18, 2019 at 12:39:05 AM UTC+3:30, Mark S. wrote: > > Oops. Here's a fix for fibonacci > > \define fibber(last,next,count)<$list filter="[<__count__>!regexp[^0$]]" > emptyMessage="<<__last__>> <<__next__>>" > > <$set name="count" filter="[<__count__>subtract[1]]" select=0> > <$set name="next" filter="[<__last__>add<__next__>]" select=0> > <<__last__>> <$macrocall $name=fibber last=<<__next__>> next=<<next>> > count=<<count>>/> > </$set></$set> > </$list> > \end > > > <<fibber "0" "1" "6">> > > > > > On Thursday, October 17, 2019 at 1:56:34 PM UTC-7, Mark S. wrote: >> >> >> >> \define fibber(last,next,count) >> <$list filter="[<__count__>!regexp[^0$]]" emptyMessage="<<last>> >> <<next>>" > >> <$set name="count" filter="[<__count__>subtract[1]]" select=0> >> <$set name="next" filter="[<__last__>add<__next__>]" select=0> >> <<__last__>> <$macrocall $name=fibber last=<<__next__>> next=<<next>> >> count=<<count>>/> >> </$set></$set> >> </$list> >> \end >> >> <<fibber "0" "1" "6">> >> >> >> >> On Thursday, October 17, 2019 at 12:50:21 PM UTC-7, Mohammad wrote: >>> >>> Sounds great Mark! >>> >>> I think it is not far from writing Fibonacci >>> <https://en.wikipedia.org/wiki/Fibonacci_number> sequence in Tiddlywiki >>> :-) >>> >>> --Mohammad >>> >>> -- 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/a959437c-1ea3-4a3a-99f9-0f9d7f4684be%40googlegroups.com.

