comparison modules/array.tp @ 184:ca249978ae96

Add join method to array
author Mike Pavone <pavone@retrodev.com>
date Sun, 25 Aug 2013 14:44:43 -0700
parents 547153211389
children 35d2cc193d99
comparison
equal deleted inserted replaced
183:97f107b9e8d3 184:ca249978ae96
100 idx <- l 100 idx <- l
101 } 101 }
102 } 102 }
103 ret 103 ret
104 } 104 }
105
106 join <- :sep {
107 if: length > 0 {
108 str <- get: 0
109 idx <- 1
110 l <- length
111 while: { idx < l } do: {
112 str <- str . sep . (get: idx)
113 }
114 str
115 } else: {
116 ""
117 }
118 }
105 } 119 }