News for hackers. Stuff that matters.
Re:Welcome to the Parallel Future of Computation by developedby on Friday May 17, 2024 @07:42AM (#40388815)
The first `fork` is from using bend and passing the initial state

  The program above will initialize a state (`x = 0`), and then, for as long as `x < 3`,
  it will "fork" that state in two, creating a `Tree/Node`, and continuing with `x + 1`.
  When `x >= 3`, it will halt and return a `Tree/Leaf` with `7`.
  When all is done, the result will be assigned to the `tree` variable:
Re:Welcome to the Parallel Future of Computation by anentropic on Friday May 17, 2024 @07:45AM (#40388837)
I would have described the logic in the exact same way, but I still don't see where initial tree = fork(0) state comes from

all the other "fork"s in the output are produced explicitly by:

    Tree/Node { lft: fork(x + 1), rgt: fork(x + 1) }
Re:Welcome to the Parallel Future of Computation by anentropic on Friday May 17, 2024 @07:47AM (#40388858)
well, it seems fork is some kind of builtin function that is intimately related to the bend construct: https://github.com/HigherOrderCO/bend/blob/main/FEATURES.md#....

so presumably the initial fork(0) state is implicitly produced by the bend