random.data: make constants available to random.data.

db4
John Benediktsson 2012-08-04 19:17:56 -07:00
parent c4f85efc9d
commit 676cc18215
1 changed files with 2 additions and 0 deletions

View File

@ -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 + ;