diff --git a/tracks-on-tracks-on-tracks/src/tracks_on_tracks_on_tracks.gleam b/tracks-on-tracks-on-tracks/src/tracks_on_tracks_on_tracks.gleam index ff46fac..5f1f512 100644 --- a/tracks-on-tracks-on-tracks/src/tracks_on_tracks_on_tracks.gleam +++ b/tracks-on-tracks-on-tracks/src/tracks_on_tracks_on_tracks.gleam @@ -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 } }