Fork me on GitHub

nice to see. Cannot wait to test it all out @porkostomus


What is wrong here :

(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]
  (conj lang lang-list))

(defn first-language
  "Returns the first language on the list."
  (lang-list first))

(defn remove-language
  "Removes the the last language added to the list."
  (rest lang-list))

(defn count-languages
  "Returns the total number of languages on the 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."
  (count-languages(add-language "Javascript"(add-language "Java"(remove-language (add-language "Lisp"(add-language "Clojure"(new-list))))))))



the test-runner says all test are green but I cannot submit. so I think there is somewhere a syntax error which the test-runner does not display

Bobbi Towers18:09:04

When I try your solution locally, I get the following error:

  "version": 2,
  "status": "error",
  "message": "----- Error --------------------------------------------------------------------\nType:     java.lang.ClassCastException\nMessage:  java.lang.String cannot be cast to clojure.lang.IPersistentCollection\nLocation: /home/porky/exercism/clojure-test-runner/exercises/concept/tracks-on-tracks-on-tracks/src/tracks_on_tracks_on_tracks.clj:11:3\n\n----- Context ------------------------------------------------------------------\n 7: \n 8: (defn add-language\n 9:   \"Adds a language to the list.\"\n10:   [lang lang-list]\n11:   (conj lang lang-list))\n      ^--- java.lang.String cannot be cast to clojure.lang.IPersistentCollection\n12: \n13: (defn first-language\n14:   \"Returns the first language on the list.\"\n15:   [lang-list]\n16:   (lang-list first))\n\n----- Locals -------------------------------------------------------------------\nlang:      \"Clojure\"\nlang-list: ()\n\n----- Stack trace --------------------------------------------------------------\nclojure.core/conj                          - <built-in>\ntracks-on-tracks-on-tracks/add-language    - /home/porky/exercism/clojure-test-runner/exercises/concept/tracks-on-tracks-on-tracks/src/tracks_on_tracks_on_tracks.clj:11:3\ntracks-on-tracks-on-tracks/add-language    - /home/porky/exercism/clojure-test-runner/exercises/concept/tracks-on-tracks-on-tracks/src/tracks_on_tracks_on_tracks.clj:8:1\ntracks-on-tracks-on-tracks/add-language    - /home/porky/exercism/clojure-test-runner/exercises/concept/tracks-on-tracks-on-tracks/src/tracks_on_tracks_on_tracks.clj:33:106\ntracks-on-tracks-on-tracks/add-language    - /home/porky/exercism/clojure-test-runner/exercises/concept/tracks-on-tracks-on-tracks/src/tracks_on_tracks_on_tracks.clj:8:1\n...\ntracks-on-tracks-on-tracks/count-languages - /home/porky/exercism/clojure-test-runner/exercises/concept/tracks-on-tracks-on-tracks/src/tracks_on_tracks_on_tracks.clj:23:1\ntracks-on-tracks-on-tracks/learning-list   - /home/porky/exercism/clojure-test-runner/exercises/concept/tracks-on-tracks-on-tracks/src/tracks_on_tracks_on_tracks.clj:33:3\ntracks-on-tracks-on-tracks/learning-list   - /home/porky/exercism/clojure-test-runner/exercises/concept/tracks-on-tracks-on-tracks/src/tracks_on_tracks_on_tracks.clj:28:1\ntracks-on-tracks-on-tracks                 - /home/porky/exercism/clojure-test-runner/exercises/concept/tracks-on-tracks-on-tracks/src/tracks_on_tracks_on_tracks.clj:36:1\ntracks-on-tracks-on-tracks-test            - /home/porky/exercism/clojure-test-runner/exercises/concept/tracks-on-tracks-on-tracks/test/tracks_on_tracks_on_tracks_test.clj:2:3"
And same result on the website


oke, then I have to find out what is wrong here


not on my browser


I see this :

Bobbi Towers18:09:40

Well since you (and Erik) have been both experiencing this something funny is likely going on


I think so, I see now on 2 challenges that all test were green and no error message and no chang to submit


but can you help me what is wrong with my code


and sorry no idea why that on Erik and I we do not see the error message

Bobbi Towers19:09:34

It says on line 11 you're trying to cast a string to a coll. Could the args to conj be reversed?


yep , that was it

Bobbi Towers19:09:47

np, but why it didn't report the error is still a mystery. I'll be looking into it.


there is a issue of that


I suspect that the problem is a syntax error which is not displayed


I had it now on 2 challenges


But this one is solved and I ask mentor feedback on it


good luck with finding out what is wrong with the error reporting


but if I can help with testing things , just ask

Bobbi Towers20:09:30

That's much appreciated 🙂 Part of the process seems to be that we're only handling an expected subset of a nearly infinite set of possible solutions. Eventually we'll start to converge on maximum coverage.