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