changeset 323:eb5f1fca9b78

Fix infinite loop in foldr:with
author Michael Pavone <pavone@retrodev.com>
date Mon, 23 Mar 2015 21:18:26 -0700
parents fb54a3af9c86
children 615f23450f8f
files modules/array.tp
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/modules/array.tp	Sun Mar 22 22:06:50 2015 -0700
+++ b/modules/array.tp	Mon Mar 23 21:18:26 2015 -0700
@@ -91,6 +91,7 @@
 		idx <- length - 1
 		while: {idx >= 0} do: {
 			acc <- fun: acc (get: idx)
+			idx <- idx - 1
 		}
 		acc
 	}