diff --git a/extra/io/random/random.factor b/extra/io/random/random.factor new file mode 100644 index 0000000000..5b8d022e95 --- /dev/null +++ b/extra/io/random/random.factor @@ -0,0 +1,16 @@ +! Copyright (C) 2012 John Benediktsson +! See http://factorcode.org/license.txt for BSD license + +USING: io kernel math random ; + +IN: io.random + + + +: random-line ( -- line/f ) + f 1 [ swap [ ?replace ] [ 1 + ] bi ] each-line drop ;