Liking cljdoc? Tell your friends :D

suffragium.ballot-util


map-ballotclj

(map-ballot f ballot)

Replace the value associated with each candidate in a ballot with the result of applying f to it.

Useful for e.g. converting ranked ballot to a ballot suitable for approval voting.

Replace the value associated with each candidate in a ballot with the result
of applying f to it.

Useful for e.g. converting ranked ballot to a ballot suitable for approval
voting.
raw docstring

pairwise-preferredclj

(pairwise-preferred ballot cands)

Given two candidates in cands, returns the preferred of those candidates in ballot. Returns nil if neither is preferred over the other.

Given two candidates in cands, returns the preferred of those candidates in
ballot. Returns nil if neither is preferred over the other.
raw docstring

top-rankedclj

(top-ranked ballot)

Returns the most-preferred candidate on the ballot. If there are multiple such candidates one is chosen in an undefined way.

Returns the most-preferred candidate on the ballot. If there are multiple
such candidates one is chosen in an undefined way.
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close