-
Notifications
You must be signed in to change notification settings - Fork 60
Closed
Description
I'm working on a patch that will replace the folds anyway, but the current code,
foldl1 f a | sz == 0 = die "foldl1" "empty array"
| otherwise = go $ sz-1
where sz = sizeofArray a
z = indexArray a 0
go i | i < 1 = f (go $ i-1) (indexArray a i)
| otherwise = zdoesn't look remotely right. The i < 1 should be i > 0 or (probably better) i /= 0, or the branches should be swapped, or something.
Metadata
Metadata
Assignees
Labels
No labels