Fork me on GitHub
#beginners
<
2017-01-24
>
abarylko06:01:54

I found it @val_waeselynck! It was me being silly and not adding the right dependency *sigh* … thanks for your help!

rauh12:01:50

Ie, '+ is not the same as +

rauh12:01:21

A symbol looks itself up in a map, just like keywords.

rauh12:01:12

Try ((resolve '+) 2 8)

codxse12:01:12

ahh. I c, so, how do I change read '+ as + in quote?

rauh12:01:59

You can do (list 1 + 1) or resolve afterwards

codxse12:01:31

great. thanks rauh 🙂

agile_geek13:01:58

@codxse How about constructing a list from the elements in expr and then eval'ing them?

agile_geek13:01:24

Whoops didn't see that had already been suggested

codxse14:01:14

once again, if quote doesn't resolve to its value, what about syntax quote? here my code again:

codxse14:01:50

Understood. I manage to get it. Thanks.

schmee18:01:21

karolisl you might want to take a look at spec: https://clojure.org/guides/spec

Drew Verlee18:01:18

(let [{:keys [a b] :as x} {:k 1}]
  a)
I would expect that to return a :k, but it returns nil. meanwhile
(let [{:keys [a b] :as x} {:k 1}]
  x)
returns {:k 1} as i would expect.

Drew Verlee18:01:59

ok right, i know why

Drew Verlee18:01:15

got my wires crossed, thats looking for the values to those keys