Hello
Lets say I have a library in C with a header like this:
#include stdio.h
/*really big structure*/
typedef struct {
int *a;
int *b;
/*lots of stuff
...
*/
int *z;
} foo;
/*this function allocate memory and fill the structure, reading from a
file*/
int create_foo(foo *f,FILE *file,int
It looks like length . show is faster
Prelude Control.Arrow let numDigits n = length $ show n
Prelude Control.Arrow let digits = iterate (`div` 10) takeWhile (0)
length
Prelude Control.Arrow let n=2^100
Prelude Control.Arrow :set +s
Prelude Control.Arrow numDigits n
301030
(0.39 secs,
this appears to work:
alphabet=map (\x-x:[]) ['a'..'z']
series=alphabet++[x++y|x-series,y-alphabet]
On Tue, Jun 16, 2009 at 8:28 PM, GüŸnther Schmidt gue.schm...@web.dewrote:
Hi guys,
I'd like to generate an infinite list, like
[a, b, c .. z, aa, ab, ac .. az, ba, bb, bc .. bz,
ca ...]
look in System.Random
randomRIO :: (Random a) = (a, a) - IO a
you can do
randomNumber-randomRIO (1,30)
On Sun, Jun 7, 2009 at 3:33 PM, ptrash ptr...@web.de wrote:
Hi,
is the are way (or a build in method) in haskell to get a random number
from
a number bottom to a number top?
Something