random.data: make constants available to random.data.
parent
c4f85efc9d
commit
676cc18215
|
|
@ -4,8 +4,10 @@ USING: combinators combinators.random effects.parser kernel
|
||||||
literals math random sequences ;
|
literals math random sequences ;
|
||||||
IN: random.data
|
IN: random.data
|
||||||
|
|
||||||
|
<<
|
||||||
CONSTANT: digits-count 10
|
CONSTANT: digits-count 10
|
||||||
CONSTANT: letters-count 26
|
CONSTANT: letters-count 26
|
||||||
|
>>
|
||||||
|
|
||||||
: random-digit ( -- ch )
|
: random-digit ( -- ch )
|
||||||
digits-count random CHAR: 0 + ;
|
digits-count random CHAR: 0 + ;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue