In this exercise you'll be writing code to keep track of a list of programming languages you want to learn on Exercism.
You have six tasks, which will all involve dealing with lists.
To keep track of the languages you want to learn, you'll need to create a new list. Define the new_list function that returns a new, empty list.
new_list()
// -> []Currently, you have a piece of paper listing the languages you want to learn: Gleam, Go, and TypeScript. Define the existing_list function to return this list.
existing_list()
// -> ["Gleam", "Go", "TypeScript"]As you explore Exercism and find more interesting languages, you want to add them to your list. Implement the add_language function to add a new language to the beginning of your list.
add_language(["OCaml", "Elixir"], "Scheme")
// -> ["Scheme", "OCaml", "Elixir"]Counting the languages one-by-one is inconvenient. Implement the count_languages function to count the number of languages on your list.
count_languages(["jq", "Elm", "Rust", "Kotlin"])
// -> 4At some point, you realize that your list is actually ordered backwards! Implement the reverse_list function to reverse your list.
reverse_list(["Python", "Julia", "Idris", "COBOL"])
// -> ["COBOL", "Idris", "Julia", "Python"]While you love all languages, Gleam has a special place in your heart. As such, you're really excited about a list of languages if:
Implement the exciting_list function to check if a list of languages is exciting:
exciting_list(["Lua", "Gleam"])
// -> TrueIn this exercise you'll be writing code to keep track of a list of programming languages you want to learn on Exercism.
You have six tasks, which will all involve dealing with lists.
To keep track of the languages you want to learn, you'll need to create a new list. Define the new_list function that returns a new, empty list.
new_list()
// -> []Currently, you have a piece of paper listing the languages you want to learn: Gleam, Go, and TypeScript. Define the existing_list function to return this list.
existing_list()
// -> ["Gleam", "Go", "TypeScript"]As you explore Exercism and find more interesting languages, you want to add them to your list. Implement the add_language function to add a new language to the beginning of your list.
add_language(["OCaml", "Elixir"], "Scheme")
// -> ["Scheme", "OCaml", "Elixir"]Counting the languages one-by-one is inconvenient. Implement the count_languages function to count the number of languages on your list.
count_languages(["jq", "Elm", "Rust", "Kotlin"])
// -> 4At some point, you realize that your list is actually ordered backwards! Implement the reverse_list function to reverse your list.
reverse_list(["Python", "Julia", "Idris", "COBOL"])
// -> ["COBOL", "Idris", "Julia", "Python"]While you love all languages, Gleam has a special place in your heart. As such, you're really excited about a list of languages if:
Implement the exciting_list function to check if a list of languages is exciting:
exciting_list(["Lua", "Gleam"])
// -> True