Fork me on GitHub
#beginners
<
2017-02-19
>
bendy03:02:00

I have a question: how could I inspect the response object from a compojure route in the repl? Is there a way to save that off as a variable in the repl?

bendy03:02:10

for example:

(defroutes my-routes
  (GET "/" req ;;<-- how can I access this variable from the repl
    ,,,))

jumar07:02:17

@bendy I think you can just use (prn-str req) and check it in console

jumar07:02:53

If you really want to play with it in REPL, you can use read-string to read it

jumar07:02:27

but you will need to escape strings

kgofhedgehogs14:02:03

I want to convert string of digits into collection of integers there better way to do this?

(map (comp read-string str) "123")
=> (1 2 3)

rauh15:02:48

@kgofhedgehogs You could do (map #(- (int %) 48) "123")