Mercurial > repos > tabletprog
diff modules/array.tp @ 342:884cd5d54c0f
Bugfix to array find:withDefault and a small optimization to array map
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 05 Apr 2015 22:49:40 -0700 |
parents | eef8a5cea812 |
children | 810b6115c1d4 e857104bd183 |
line wrap: on
line diff
--- a/modules/array.tp Sun Apr 05 22:48:59 2015 -0700 +++ b/modules/array.tp Sun Apr 05 22:49:40 2015 -0700 @@ -98,6 +98,7 @@ map <- :fun { new <- #[] + new resize: length foreach: self :idx el { new append: (fun: el) } @@ -126,6 +127,8 @@ value <- v } idx <- l + } else: { + idx <- idx + 1 } } ret @@ -189,6 +192,7 @@ self set: index val } } + self } join <- :sep {