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

John Benediktsson 2012-08-04 19:17:56 -07:00
parent ac8dfc7128
commit 373f30d673
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 ;
IN: random.data
<<
CONSTANT: digits-count 10
CONSTANT: letters-count 26
>>
: random-digit ( -- ch )
digits-count random CHAR: 0 + ;