Thanks Olaf, I'll follow up your references.
Tom
On Wed, 3 Apr 2002 21:40, Olaf Chitil wrote:
> Tom Bevan wrote:
> > What I would like to know is how the 'fix' function could be used
> > to find the fixed point of a function like ( \n -> 2*n ).
> >
> &
I've been watching the discussion of the fixed point function with interest.
In Antony's example,
> factGen = \f -> \n -> if n==0 then 1 else n * f (n-1)
The fixed point of factGen is clearly n! because
0! = 1
and
n! = n * (n-1) * (n-2) * .. * 1 = n * ( (n-1)! ) = n * f (n-1)
so the factGen tra
I noticed that Ralf Hinze posted a CPS monad yesterday.
Would someone be kind enough to post a simple example of a function that uses
CPS.
Thanks
Tom
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Hi,
I've come across this sort of data constructor below many times but I'm
not really sure how to use it. Can someone please point me to the right
section in the documentation?
In particular, I want to know how to create a calendar time and how to
access the fields .
Tom
data CalendarTime =
How should I modify the function below so that characters are printed
out as they arrive?
Thanks.
Tom
printchar :: Handle -> IO ()
printchar handle = do c <- hGetChar handle
putChar c
___
Haskell-Cafe mailing list
[EMAIL P
he right track.
Tom
On Thu, 2002-01-24 at 14:32, Andre W B Furtado wrote:
> Hi, I have the same problem. Did anyone answered your question?
>
> Thanks,
> -- Andre
>
> ----- Original Message -
> From: Tom Bevan <[EMAIL PROTECTED]>
> To: Haskell Cafe List <[
I consider myself a newbie too but here are my solutions
Tom
On Fri, 2002-01-18 at 10:14, Amrit K Patil ;012;VKSF6; wrote:
>
> Hi,
>
> I am newbie at Haskell.
>
> I am not able to write a program to find the number of unique elments in a
> list in haskell.
>
> I am also not able to write a
Hi all,
I'm trying to get a feel for how monads might be used in a Haskell
program and develop an approach that would be useful for larger
projects.
I have tried to model in miniture a programme which takes input from
'standard in' and processes it against an internal state and then
returns the
On Sat, 2002-01-05 at 05:03, Zhanyong Wan wrote:
> Hi,
>
> Ashley Yakeley wrote:
>
> | The "layout" rules drive me nuts. You might prefer using parentheses and
> | semicolons, as I do:
>
> I guess the point behind the layout rules is that anything violating such
> rules is considered bad progra
When trying to right IO I continually run across this
sort of compile error which I just don't understand.
Any help would be very muich appreciated.
Function:
while :: IO Bool -> IO () -> IO ()
while test action = do res <- test
if res then do action
10 matches
Mail list logo