News for hackers. Stuff that matters.
Re:Statements vs. Expressions by wruza on Thursday July 14, 2022 @07:21AM (#32094471)
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.

There are no comments on this comment yet.