aboutsummaryrefslogtreecommitdiffstats
path: root/examples/words.aup
blob: 2bfc0a5522a81293169a97de7cc3a20832004d30 (plain)
1
2
3
4
5
# Words for counts and marks. A library: only fns, no state, so any app can
# `use words` and call words.counted(...).
fn plural(count, one, many) = if count == 1 { one } else { many }
fn counted(count, one, many) = "{count} {plural(count, one, many)}"
fn check(done) = if done { "x" } else { " " }