Make a fibonacci series and output numbers to consol

Just following on from the Manual examples in sections 4.3.4 Multiple triggers and 4.3.5 Feedback loops I thought how can I hold not just the last added value, but the one before it also and then add the two for the new number to append to list.

Tried a whole bunch of approaches using all kinds of nodes like Schedule to start making a list with 0 and 1 and then the latest addition. Tried using enqueue (I’d use a Queue in QC I think).

I just can’t work out even an overly complicated way to do this in Vuo let alone an elegant way.

There may be a more elegant way to do this, but here is one approach. My challenge was seeding the list with the first two terms.

fib1.vuo (3.69 KB)

Thanks for the solution, @jmcc. Yes seeding a loop is tricking in Vuo! And I wasn’t aware of the Spin Off Event nodes, which certainly put solving this within reach, so thanks for those. I wonder if there’s a next level Vuo that can make solving the event logic of these kinds of things easier. Will give it some thought, to this new user a solution this complicated is a bit opaque to the casual glance of a novice user and would be hard to just cobble together following one’s nose.

Computing patterns are best met in Vuo with dedicated nodes I’m feeling, where they just work taking the misuse/misunderstanding of event flow etc out of the equation.  

I thought this would be a more elegant (or at least discernible) way to do it, @jmcc. But it’s not adding the calculated value to the end of the new list, it’s adding the last number to the start of the new list. Very confusing to me how it’s getting the Build List order messed up. If you hover on the ports (see green and pink rectangles) you can see it has worked out that 8 is the next number in the sequence but it didn’t get written to the list (blue rectangle). Maybe you can sort it out and get it going for me?! And even better, explain what I’ve done wrong here!

fib2_with_build_list.vuo (5.72 KB)

Here, this is simpler:

Fibonacci-Enqueue.vuo (2.02 KB)

Here’s a third way, using Build List.

fib3.vuo (2.87 KB)

Thanks, Jaymie, very simple.

Actually even the Get Last Item node is superfluous. Just connect add to Console or another Enqueue node.  

Nice @jmcc! Thx.