]> gitweb.factorcode.org Git - factor.git/blob - extra/random/c/c.factor
Switch to https urls
[factor.git] / extra / random / c / c.factor
1 ! Copyright (C) 2013 John Benediktsson
2 ! See https://factorcode.org/license.txt for BSD license
3
4 USING: alien.c-types alien.syntax kernel random ;
5
6 IN: random.c
7
8 LIBRARY: libc
9
10 FUNCTION: int rand ( )
11
12 SINGLETON: c-random
13
14 M: c-random random-32* drop rand ;
15
16 : with-c-random ( quot -- )
17     [ c-random ] dip with-random ; inline