Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
11
Task/Search-a-list/Ceylon/search-a-list.ceylon
Normal file
11
Task/Search-a-list/Ceylon/search-a-list.ceylon
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
shared test void searchAListTask() {
|
||||
value haystack = [
|
||||
"Zig", "Zag", "Wally", "Ronald", "Bush",
|
||||
"Krusty", "Charlie", "Bush", "Bozo"];
|
||||
|
||||
assert(exists firstIdx = haystack.firstOccurrence("Bush"));
|
||||
assert(exists lastIdx = haystack.lastOccurrence("Bush"));
|
||||
|
||||
assertEquals(firstIdx, 4);
|
||||
assertEquals(lastIdx, 7);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue