Abstract List's toString method to a more general join method on Sequence.

This commit is contained in:
Gavin Schulz
2015-01-24 14:01:16 -08:00
parent c3a858a2c7
commit 4977083904
9 changed files with 76 additions and 18 deletions
+4
View File
@@ -0,0 +1,4 @@
var a = 1..3
IO.print(a.join) // expect: 123
IO.print(a.join(", ")) // expect: 1, 2, 3
+1
View File
@@ -0,0 +1 @@
(1..3).join(2) // expect runtime error: Right operand must be a string.