Handbook
Glossary
generate-question* ( question -- quot )
Vocabulary
quiz
Inputs
question
an
object
Outputs
quot
an
object
Definition
IN:
quiz
GENERIC:
generate-question*
( question -- quot )
Methods
USING:
combinators
quiz
quotations
;
M:
callable
generate-question*
( -- quot )
call-effect
;
USING:
kernel
quiz
random
unicode.flags
unicode.flags.images
;
M:
country-code-from-flag
generate-question*
drop
valid-flags
random
'[
_
flag>unicode
]
;
USING:
kernel
quiz
random
unicode.flags
unicode.flags.images
;
M:
country-name-from-flag
generate-question*
drop
valid-flags
random
'[
_
flag>country
]
;
USING:
kernel
quiz
random
unicode.flags
unicode.flags.images
;
M:
flag-from-country-code
generate-question*
drop
valid-flag-names
random
'[
_
unicode>flag
]
;
USING:
assocs
countries
kernel
quiz
random
unicode.flags
unicode.flags.images
;
M:
flag-from-country-name
generate-question*
drop
valid-flag-names
random
alpha-2
?at
drop
'[
_
country>flag
]
;
USING:
accessors
kernel
math
quiz
random
sequences
;
M:
math-multiplication
generate-question*
[
count>>
random
]
[
n>>
]
bi
'[
_
random
2
+
]
replicate
'[
_
product
]
;
USING:
accessors
math
quiz
random
;
M:
math-sq
generate-question*
random-choices>>
random
'[
_
sq
]
;
USING:
accessors
math
math.functions
quiz
random
;
M:
math-sqrt
generate-question*
random-choices>>
random
sq
'[
_
sqrt
>integer
]
;
USING:
accessors
kernel
quiz
sequences
;
M:
multiple-choice-question
generate-question*
[
n>>
]
[
generator>>
]
bi
'[
_
generate-question*
]
replicate
;
USING:
accessors
quiz
;
M:
question
generate-question*
generator>>
generate-question*
;
USING:
accessors
combinators.smart
continuations
kernel
quiz
random
sequences
splitting
;
M:
stack-shuffler
generate-question*
n-shufflers>>
[
stack-shufflers
random
]
[
]
replicate-as
[
inputs
first-n-letters
]
keep
'[
_
_
with-datastack
join-words
]
;
USING:
assocs
kernel
quiz
random
;
M:
state-capital
generate-question*
drop
state-capitals
keys
random
'[
_
state-capitals
at
]
;