tracks-on-tracks-on-tracks v2

This commit is contained in:
Alexander Heldt
2025-11-03 21:49:10 +01:00
parent b8181175c9
commit 0df72539ef

View File

@@ -24,13 +24,9 @@ pub fn exciting_list(languages: List(String)) -> Bool {
// - The first on the list is Gleam.
// - The second item on the list is Gleam and the list contain either two or three languages.
case languages {
[first] -> first == "Gleam"
[first, second, ..] ->
first == "Gleam"
|| {
second == "Gleam"
&& { list.length(languages) == 2 || list.length(languages) == 3 }
}
["Gleam", ..] -> True
[_, "Gleam"] -> True
[_, "Gleam", _] -> True
_ -> False
}
}