In this exercise you'll be writing code to process a list of programming languages you are planning to practice from Exercism platform.
You have six tasks.
Before you can add languages, you'll need to start by creating a new list. Define a function that returns an empty list.
(new-list)
;; => ()As you explore Exercism and find languages you want to learn, you'll need to be able to add them to your list. Define a function to add a new language the beginning of your list.
(add-language '("Clojurescript") "JavaScript")
;; => '("JavaScript" "Clojurescript")You'll want to quickly check which language you just added. Define a function that returns the first language from your list.
(first-language '("Haskell" "Python"))
;; => "Haskell"Sometimes you'll change your mind about a language you just added. Define a function to remove the first language from your list.
(remove-language '("Common Lisp" "Racket" "Scheme"))
;; => '("Racket" "Scheme")Counting the languages one-by-one is inconvenient. Define function to count the number of languages on your list.
(count-languages '("C#" "Racket" "Rust" "Ruby"))
;; => 4Define a learning-list function, within which you will use the some of the functions you've defined above.
Create an empty list
Add 2 new programming languages to the list.
Remove "Lisp" from the list, as you might not have enough time for the year, and it's quite similar to Clojure.
Add 2 more programming languages to the list.
Return the total number of languages. Hint: it should be 3.
(learning-list)
;; => 3In this exercise you'll be writing code to process a list of programming languages you are planning to practice from Exercism platform.
You have six tasks.
Before you can add languages, you'll need to start by creating a new list. Define a function that returns an empty list.
(new-list)
;; => ()As you explore Exercism and find languages you want to learn, you'll need to be able to add them to your list. Define a function to add a new language the beginning of your list.
(add-language '("Clojurescript") "JavaScript")
;; => '("JavaScript" "Clojurescript")You'll want to quickly check which language you just added. Define a function that returns the first language from your list.
(first-language '("Haskell" "Python"))
;; => "Haskell"Sometimes you'll change your mind about a language you just added. Define a function to remove the first language from your list.
(remove-language '("Common Lisp" "Racket" "Scheme"))
;; => '("Racket" "Scheme")Counting the languages one-by-one is inconvenient. Define function to count the number of languages on your list.
(count-languages '("C#" "Racket" "Rust" "Ruby"))
;; => 4Define a learning-list function, within which you will use the some of the functions you've defined above.
Create an empty list
Add 2 new programming languages to the list.
Remove "Lisp" from the list, as you might not have enough time for the year, and it's quite similar to Clojure.
Add 2 more programming languages to the list.
Return the total number of languages. Hint: it should be 3.
(learning-list)
;; => 3