Random number generator (device): Difference between revisions

→‎{{header|Java}}: added Haskell (although I am not an expert and may have done it inefficiently)
(→‎{{header|REXX}}: added the REXX language. -- ~~~~)
(→‎{{header|Java}}: added Haskell (although I am not an expert and may have done it inefficiently))
Line 214:
}
}</lang>
 
=={{header|Haskell}}==
{{Works with|GHC|7.4.1}}
<lang haskell>#!/usr/bin/runhaskell
 
import System.Entropy
import Data.Binary.Get
import qualified Data.ByteString.Lazy as B
 
get32 = do
w32 <- getWord32be
return w32
 
main = do
bytes <- getEntropy 4
putStrLn $ show $ runGet get32 $ B.fromChunks [bytes]</lang>
 
=={{header|NetRexx}}==
Anonymous user