Data update
This commit is contained in:
parent
29a5eea0d4
commit
5c1bb7bfa9
2011 changed files with 35081 additions and 3229 deletions
12
Task/Search-a-list/Ecstasy/search-a-list.ecstasy
Normal file
12
Task/Search-a-list/Ecstasy/search-a-list.ecstasy
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
module test {
|
||||
@Inject Console console;
|
||||
|
||||
void run() {
|
||||
String[] haystack = ["this", "needle", "is", "a", "test"];
|
||||
if (Int pos := haystack.indexOf("needle")) {
|
||||
console.print($"Found the needle at {pos=}");
|
||||
} else {
|
||||
console.print("No needle in the haystack");
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue