3 ms·
Not sure if it was irony, but check out Haskell and alikes. Its execution model is different from a regular “it evaluates at where it is”. Infinite lists like a
by wruza 4y ago
Not sure if it was irony, but check out Haskell and alikes. Its execution model is different from a regular “it evaluates at where it is”. Infinite lists like all natural numbers are a norm in it.
ones = 1 : ones
take 3 ones // [1,1,1]
odds = 1 : map (+2) odds
take 3 odds // [1,3,5]
Haskell has a statement-like “do” notation, but it is a syntactic sugar for a structure of specific operators.
Lisp is also a beast to be aware of, though it is not exactly what you described.