Skip to main content
2 of 2
added 11 characters in body
lyxal
  • 34.3k
  • 2
  • 64
  • 141

Vyxal, 2 bytes

ÞF

Try it Online!

Before you go saying that the online link doesn't match the submission here, that's because the extra , is needed to actually make the output appear online. If you use the offline version, then you will see that the above works just fine. Also, the 5 flag makes sure that the online interpreter times out after 5 seconds.

Explained

ÞF  # Push every Fibonacci number

And now for the non-trivial version

Vyxal 5, 6 bytes

⁽+dk≈Ḟ

Try it Online!

Once again, discrepancies between online link and actual version are for the purposes of making it work online.

Explained

⁽+dk≈Ḟ
⁽+d     # lambda x, y: x + y
   k≈   # the list [0, 1]
     Ḟ  # Create an infinite sequence based on the function and the initial list.

Fun fact: the infinite sequence function you see was inspired by the sequence blocks of the golfing language Arn by ZippyMagician.

lyxal
  • 34.3k
  • 2
  • 64
  • 141