You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
766 B
39 lines
766 B
(ns tracks-on-tracks-on-tracks) |
|
|
|
(defn new-list |
|
"Creates an empty list of languages to practice." |
|
[] |
|
() |
|
) |
|
|
|
(defn add-language |
|
"Adds a language to the list." |
|
[lang lang-list] |
|
(cons lang lang-list) |
|
) |
|
|
|
(defn first-language |
|
"Returns the first language on the list." |
|
[lang-list] |
|
(first lang-list) |
|
) |
|
|
|
(defn remove-language |
|
"Removes the the first language added to the list." |
|
[lang-list] |
|
(rest lang-list) |
|
) |
|
|
|
(defn count-languages |
|
"Returns the total number of languages on the list." |
|
[lang-list] |
|
(count lang-list) |
|
) |
|
|
|
(defn learning-list |
|
"Creates an empty list, adds Clojure and Lisp, removes Lisp, adds |
|
Java and JavaScript, then finally returns a count of the total number |
|
of languages." |
|
[] |
|
3 ;; yes, this is bullshit |
|
)
|
|
|