2 ms·
Not all array languages fold right. K's reduce is a left fold and BQN has a mix of both. My understanding is that a right fold was chosen because it's more ex
by gitonthescene 3y ago
Not all array languages fold right. K's reduce is a left fold and BQN has a mix of both. My understanding is that a right fold was chosen because it's more expressive. You get alternating sums when folding subtraction with a right fold and something less interesting if you use a left fold. FWIW, that(s my understanding of the history. I don't actually think the argument is very compelling.