Category talk:Wren-seq: Difference between revisions

→‎Source code: Added Seq.write and Seq.print methods.
m (→‎Source code: Added quotes to 'lang' attribute.)
(→‎Source code: Added Seq.write and Seq.print methods.)
Line 41:
if (count <= 0) count = 0
return a.take(count)
}
 
// Writes a sequence in list format to stdout
// but without having to convert it to a list first.
static write(s) {
isSeq_(s)
System.write("[")
for (e in s) System.write("%(e), ")
System.write("\b\b]")
}
 
// As 'write' followed by a new line.
static print(s) {
write(s)
System.print()
}
}
9,482

edits