Skip to content

Instantly share code, notes, and snippets.

@fdaoud fdaoud/gist:1320378
Created Oct 27, 2011

What would you like to do?
Ball of mud
(let [
rnd (send-command "status" "getPredictionRnd")
latest-rnd (send-command "prediction" "getLatestPredictionRnd" {:pooler_id pooler_id :sheet rnd})
preds (send-command "prediction" "getPredictionsForMatchups" {:pooler_id pooler_id :sheet rnd :rnd latest-rnd})]
(if (or (nil? rnd) (= rnd 0))
{:errors "rnd_is_nil_or_zero"}
(seq preds) preds
(= rnd 1) (.query persistence "team_playoffs" {})
true (send-command "result" "getWinners" {:rnd (dec rnd)})))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.