<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'><div dir='ltr'>
<br><br><div>> To: beginners@haskell.org<br>> From: es@ertes.de<br>> Date: Mon, 8 Aug 2011 12:51:34 +0200<br>> Subject: Re: [Haskell-beginners] making function problem (chapter 6 of        Programming in Haskell)<br>> <br>> Roelof Wobben <rwobben@hotmail.com> wrote:<br>> <br>> > After a short holiday I now studying chapter 6 of this book.<br>> ><br>> > For the first exercise I have to make the function for ^ for postitive<br>> > numbers.<br>> <br>> I assume you mean the exponentiation function, and the only real<br>> indication for that is the solution you quoted later in your post. To<br>> help us help, you really should work on your problem descriptions.<br>> <br>> <br>> > Step 1 : Defining the type<br>> ><br>> > ^ :: [Int] -> Int<br>> <br>> First of all, you have to learn proper Haskell syntax. Your type<br>> signature is invalid. But let me rewrite your type signature to correct<br>> syntax:<br>> <br>> (^) :: [Int] -> Int<br>> <br>> This is the type signature for a function (^), which expects exactly one<br>> argument, a list. Is this really what you want? Before going any<br>> further, you should come up with the right type signature for your<br>> function. Once you have that, we will continue.<br>> <br><br>oke, <br><br>I don't think I want that.<br>I want to type this 2^3 and then the outcome will be 8.<br>So next try <br><br>(^) :: Int -> Int -> Int<br><br>Because the first and second numbers are integers and the outcome also will be a integer.<br><br>Roelof<br><br></div>                                            </div></body>
</html>