Fork me on GitHub
#beginners
<
2021-05-20
>
Joel Jucá00:05:56

@rob370 did you check Exercism already? It’s both a community and command-line app that provides a learning experience along with a community-powered mentorship program

Rob Haisfield00:05:44

Oooh @joelwallis good recommendation

✌️ 2
Joel Jucá00:05:22

Exercism is awesome! I’ve even contributed to the JavaScript and the [now dead] ECMAScript track in the past. It’s really a master piece of self-learning platforms. I’ve been on it for JS, Elixir, Erlang, Python, Ruby, and other languages. Lots of fun is mostly guaranteed! 😆

pithyless07:05:09

@joelwallis there is an #exercism channel where people contributing to the Clojure track hang out

Rob Haisfield01:05:33

How can I make this code return strings rather than individual characters?

Michael Stokley01:05:53

what should the output look like?

Michael Stokley01:05:54

is this right?

(let [car-names ["audi" "bmw" "fiat" "haval"]
      car-models ["" ["x1" "i3"] "500" ""]]
  (map vector car-names car-models))
;; => (["audi" ""] ["bmw" ["x1" "i3"]] ["fiat" "500"] ["haval" ""])

Michael Stokley01:05:13

but i would adjust car-models to be [[] ["x1" "i3"] ["500"] []], if possible

Michael Stokley01:05:32

which gets you

(let [car-names ["audi" "bmw" "fiat" "haval"]
      car-models [[] ["x1" "i3"] ["500"] []]] ;; empty list instead of empty string
  (map vector car-names car-models))
;; => (["audi" []] ["bmw" ["x1" "i3"]] ["fiat" ["500"]] ["haval" []])

Michael Stokley01:05:58

or even

(let [car-names ["audi" "bmw" "fiat" "haval"]
      car-models [[] ["x1" "i3"] ["500"] []]] ;; empty list instead of empty string
  (->> (map vector car-names car-models)
       (into {})))
;; => {"audi" [], "bmw" ["x1" "i3"], "fiat" ["500"], "haval" []}

Rob Haisfield02:05:24

This is the desired output ; desired output of the function = “Audi, BMW X1, BMW i3, Fiat 500, Haval”

Rob Haisfield02:05:46

I’m going to try the empty lists

Jacob Rosenzweig03:05:56

Is a threading macro basically equivalent to ocaml piping?

Luciano Laratelli03:05:01

hi! is this the appropriate channel for newbie cljs questions, or should that be in #clojurescript? 🙂

dpsutton03:05:38

Here’s fine.