You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
400 B
Scheme
12 lines
400 B
Scheme
(define a-vat (spawn-vat))
|
|
(define-vat-run a-run a-vat)
|
|
(define dec (a-run (spawn ^decision "Bike Shed")))
|
|
(a-run ($ dec 'add-alternative "red"))
|
|
(a-run ($ dec 'add-alternative "green"))
|
|
(a-run ($ dec 'add-alternative "blue"))
|
|
(define vote (a-run (spawn ^ranked-choice-vote dec)))
|
|
(define ballot (a-run ($ vote 'add-ballot)))
|
|
|
|
(define (rank312 alts) '(3 1 2))
|
|
(a-run ($ ballot 'update-vote rank312))
|