Fork me on GitHub
#re-frame
<
2017-06-04
>
dimovich01:06:36

@mikethompson thanks! having a look.

sandbags10:06:27

@andre I don't know if it's only me that does this (and it probably suggests I should be using spec) however every now-and-again (just not often enough that I check for it first) I use assoc instead of assoc-in when updating some part of my database and end up with a mapping like [:x :y] value which breaks Re-Frisk with one strange error or another. I'm not sure what kind of overhead it might add to check for this but it would be useful.

lumpy21:06:46

so I’m trying to generate a list of things in a v-box I do something like [v-box :children (mapv (partial vector 'player) players dice)]

lumpy21:06:16

this doens’t work but if I copy the output and replace the mapv with it, it does

lumpy21:06:42

I need to do [v-box :children (mapv (fn [p d] [player p d]) players dice)]

lumpy21:06:08

which gives me the same output in the repl. what’s going on here

pesterhazy21:06:36

in the first example you have a apostrophe 'player

lumpy21:06:56

ya I thought that ‘player would resolve to player after the map

lumpy21:06:10

I’m realizing that’s not the case

pesterhazy21:06:24

a symbol is not a function, it cannot occupy the first place in a reagent/hiccup vector

lumpy21:06:36

since the output in the repl is the same for both

pesterhazy21:06:30

in lumo, a function prints like this:

cljs.user=> [identity]
[#object[Function "function (a){return a}"]]

pesterhazy21:06:13

a symbol likes this

cljs.user=> ['identity]
[identity]

pesterhazy21:06:26

is it different on your system?

lumpy21:06:32

#object[clojure.core$identity 0x3301ba9e "clojure.core$identity@3301ba9e"]

lumpy21:06:57

ya, that makes sense, this helped clear it up. Thanks