This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Fran Pérez
Posted Feb 22 - Read on Facebook

Shouldn't this work?

toggler = Utils.cycle(-> print "a", -> print "b", -> print "c")
toggler() // "a"
toggler() // "b"
toggler() // "c"

4 Comments

Seoh Char

Fran Pérez

Isn't there a better way to execute in cycle 3 functions with the same call?

Syrus Akbary Nieto

toggler = Utils.cycle((-> print "a"), (-> print "b"), (-> print "c"))
toggler() for i in [0..2]

Fran Pérez

Another way to do this is using: do :)

Read the entire post on Facebook