# HG changeset patch # User Michael Pavone # Date 1428299380 25200 # Node ID 884cd5d54c0f95822401d9cc9b9890e6a32e5a20 # Parent 6871e72b6db2e89c8cbb8122849cc6aa089e796f Bugfix to array find:withDefault and a small optimization to array map diff -r 6871e72b6db2 -r 884cd5d54c0f modules/array.tp --- 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 {