[Haskell-beginners] making function problem (chapter 6 of Programming in Haskell)

Roelof Wobben rwobben at hotmail.com
Mon Aug 8 20:12:47 CEST 2011




----------------------------------------
> From: rwobben at hotmail.com
> To: beginners at haskell.org
> Date: Mon, 8 Aug 2011 15:35:55 +0000
> Subject: Re: [Haskell-beginners] making function problem (chapter 6 of Programming in Haskell)
>
>
>
>
> ----------------------------------------
> > To: beginners at haskell.org
> > From: es at ertes.de
> > Date: Mon, 8 Aug 2011 17:28:08 +0200
> > Subject: Re: [Haskell-beginners] making function problem (chapter 6 of Programming in Haskell)
> >
> > Roelof Wobben <rwobben at hotmail.com> wrote:
> >
> > > Im not guessing.
> > >
> > > Im trying to understand what you mean by exponation rules.
> > >
> > > As far as I can imagaging it cannot be done the same way as you
> > > described the sum problem.
> >
> > Try with multiplication first. If you can do multiplication, then
> > exponentiation should be clear.
> >
> >
> > Greets,
> > Ertugrul
> >
> >
> > --
> > nightmare = unsafePerformIO (getWrongWife >>= sex)
> > http://ertes.de/
> >
> >
> >
> > _______________________________________________
> > Beginners mailing list
> > Beginners at haskell.org
> > http://www.haskell.org/mailman/listinfo/beginners
>
>
>
>
>
>
> Oke,
>
>
>
> Just to be sure.
>
> I only have to use suc and pred ?
>
>
>
> I think you want something like this :
>
>
>
> x + 0 = x
> x + y = succ x + pred y
>
>
>
> Roelof
>
>
>
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners


 

oke, 

 

Maybe you are looking something like this : 

 

x * 0 = 0

0 * y = 0 

x * y = z 

 

Roelof

 

  		 	   		  


More information about the Beginners mailing list