Skip to content

Commit 1e30a1d

Browse files
author
Rafa Paradela
committed
Merge pull request scala-exercises#42 from paine724/patch-1
Add a message to let users know tuples are indexed beginning at 1
2 parents 029ea88 + 2584a78 commit 1e30a1d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/json/tuples.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"title": "Tuples",
33
"modules": [
44
{
5-
"preparagraph": "Scala tuple combines a fixed number of items together so that they can be passed around as a whole. Unlike an array or list, a tuple can hold objects with different types but they are also immutable. Here is an example of a tuple holding an integer, a string, and the console:\n\n```\nval t = (1, \"hello\", Console)\n```\n\nWhich is syntactic sugar (short cut) for the following:\n\n```\nval t = new Tuple3(1, \"hello\", Console)\n```\nAs you can see, tuples can be created easily:",
5+
"preparagraph": "Scala tuple combines a fixed number of items together so that they can be passed around as a whole. They are one indexed. Unlike an array or list, a tuple can hold objects with different types but they are also immutable. Here is an example of a tuple holding an integer, a string, and the console:\n\n```\nval t = (1, \"hello\", Console)\n```\n\nWhich is syntactic sugar (short cut) for the following:\n\n```\nval t = new Tuple3(1, \"hello\", Console)\n```\nAs you can see, tuples can be created easily:",
66
"code": "val tuple = (\"apple\", \"dog\")\nval fruit = tuple._1\nval animal = tuple._2\n\nfruit should be(__)\nanimal should be(__)",
77
"solutions": [
88
"\"apple\"",
@@ -39,4 +39,4 @@
3939
"postparagraph": ""
4040
}
4141
]
42-
}
42+
}

0 commit comments

Comments
 (0)