Comment

Comment by librasteve

Well sure - being in a rut is good. But the language is the medium in which you cast your idiom, right?

Here's a Python rut:

  n = 20  # how many numbers to generate
  a, b = 0, 1
  for _ in range(n):
    print(a, end=" ")
    a, b = b, a + b
  print()
Here's that rut in Raku:

  (0,1,*+*...*)[^20]
I am claiming that this is a nicer rut.
parent librasteve 8 months ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton