(no title)
librasteve | 10 days ago
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.
zephen|10 days ago
If it's so fantastic, then why on earth do you go out of your way to add extra lines and complexity to the Python?
jaen|10 days ago
Even though I barely know Raku (but I do have experience with FP), it took way less time to intuitively grasp what the Raku was doing, vs. both the Python versions. If you're only used to imperative code, then yeah, maybe the Python looks more familiar, though then... how about riding some new bicycles for the mind.
librasteve|10 days ago