code-reviews

slester 2016-03-01T05:07:17.000011Z

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

2016-03-01T05:08:54.000012Z

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

2016-03-01T05:09:33.000013Z

replace both maps in the let bindings with a for

2016-03-01T05:09:50.000014Z

the maps with the #() literals

2016-03-01T05:11:11.000015Z

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

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

slester 2016-03-01T05:11:30.000016Z

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

2016-03-01T05:12:24.000017Z

last is linear time

2016-03-01T05:12:50.000018Z

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

slester 2016-03-01T05:13:37.000019Z

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

slester 2016-03-01T05:33:31.000020Z

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

slester 2016-03-01T05:33:36.000021Z

I should stop trying to shove everything into let