Fork me on GitHub
#code-reviews
<
2016-03-01
>
slester05:03:17

I feel like this is really ugly code, and I'd be happy to have someone look at this and give me tips: https://www.refheap.com/d9418416ff7a30e9668721c9e

hiredman05:03:54

I would start pulling the values in the let binding out as functions

hiredman05:03:33

replace both maps in the let bindings with a for

hiredman05:03:50

the maps with the #() literals

hiredman05:03:11

sort-by + last is really bad, I would at least change those to something like

(first (sort-by (comp - :points) ...))

slester05:03:30

really bad time-wise? there's at most 4 players

hiredman05:03:24

last is linear time

hiredman05:03:50

I mean, I guess for 4 players it doesn't really matter, but it seems l ike a bad habbit

slester05:03:37

I mean I'd definitely be giving it more thought than just using last if it were a list of anything more than 4

slester05:03:31

thanks for the tips @hiredman, it looks a lot better simple_smile

slester05:03:36

I should stop trying to shove everything into let