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.
17 lines
544 B
Scheme
17 lines
544 B
Scheme
(use-modules (deliberate)
|
|
(goblins)
|
|
(goblins vrun)
|
|
(goblins actor-lib methods))
|
|
|
|
(define a-vat (spawn-vat))
|
|
(define-vat-run a-run a-vat)
|
|
(define delib (a-run (spawn ^deliberation "Bike Shed")))
|
|
(a-run ($ delib 'add-alternative "red"))
|
|
(a-run ($ delib 'add-alternative "green"))
|
|
(a-run ($ delib 'add-alternative "blue"))
|
|
(define vote (a-run (spawn ^ranked-choice-vote delib ($ delib 'debug-alternatives))))
|
|
(define ballot (a-run ($ vote 'add-ballot)))
|
|
|
|
(define (rank31f alts) '(3 1 #f))
|
|
(a-run ($ ballot 'update-vote rank31f))
|