97 - List Generate

Опубликовано: 26 Август 2024
на канале: WesleySon
97
3

I think I finally understand the function
(famous last words)

The tricky part is that all the lines (except the first line) are functions which take the CURRENT value as their argument.
Meaning you calculate the NEXT value, but you still print the CURRENT.
Whereas in a normal programming language, when you say "x = x + 1" and then print x, you print the new X which is now +1. In List Generate, you print the current x, which hasn't been manipulated.


00:16 Simple example
01:10 The first line is an empty function
04:08 Example with variables
05:22 Selector-argument
06:51 [x] vs x
07:48 Why 1, 0, 1
09:08 Simple example in Python
10:43 Complex example in Python