<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>&gt; To: beginners@haskell.org<br>&gt; From: es@ertes.de<br>&gt; Date: Mon, 8 Aug 2011 12:51:34 +0200<br>&gt; Subject: Re: [Haskell-beginners] making function problem (chapter 6 of        Programming in Haskell)<br>&gt; <br>&gt; Roelof Wobben &lt;rwobben@hotmail.com&gt; wrote:<br>&gt; <br>&gt; &gt; After a short holiday I now studying chapter 6 of this book.<br>&gt; &gt;<br>&gt; &gt; For the first exercise I have to make the function for ^ for postitive<br>&gt; &gt; numbers.<br>&gt; <br>&gt; I assume you mean the exponentiation function, and the only real<br>&gt; indication for that is the solution you quoted later in your post.  To<br>&gt; help us help, you really should work on your problem descriptions.<br>&gt; <br>&gt; <br>&gt; &gt; Step 1 : Defining the type<br>&gt; &gt;<br>&gt; &gt; ^ :: [Int] -&gt; Int<br>&gt; <br>&gt; First of all, you have to learn proper Haskell syntax.  Your type<br>&gt; signature is invalid.  But let me rewrite your type signature to correct<br>&gt; syntax:<br>&gt; <br>&gt;     (^) :: [Int] -&gt; Int<br>&gt; <br>&gt; This is the type signature for a function (^), which expects exactly one<br>&gt; argument, a list.  Is this really what you want?  Before going any<br>&gt; further, you should come up with the right type signature for your<br>&gt; function.  Once you have that, we will continue.<br>&gt; <br><br>oke, <br><br>I don't think I want that.<br>I want to type this&nbsp; 2^3 and then the outcome will be 8.<br>So next try <br><br>(^) :: Int -&gt; Int -&gt; 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>