Jump to content

Category talk:Wren-seq: Difference between revisions

→‎Source code: Added Lst.exchange method.
(→‎Source code: Changes to make this module more consistent with other Wren modules.)
(→‎Source code: Added Lst.exchange method.)
Line 120:
static indexOf(a, value) { indexOf(a, value, 0) }
static indexOfAny(a, values) { indexOfAny(a, values, 0) }
 
// Exchanges the elements at indices 'i' and 'j' of 'a'.
static exchange(a, i, j) {
isList_(a)
if (i == j) return
var t = a[i]
a[i] = a[j]
a[j] = t
}
 
// Returns true if 'a' contains ALL the values of a sequence, false otherwise.
9,487

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.