<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'>
Hello, <br><br>I have made a exercise where I must split a even list.<br>The answer is :<br><br>halve xs = (take n xs drop n xs) <br> where n = length xs 'div' 2 <br><br>Now I want to change it so i can split even and not even list,.<br>I thought this can be the answer <br><br>halve xs = <br> lenght xs 'mod' 2 = 0 : (take n xs drop n xs) <br> otherwise : (take n+1 xs drop n+1 xs) <br> where <br> n = length xs 'div' 2 <br><br><br>Can this be working ?<br>I did not check this on GCHI because Im re - installing my OS.<br><br>Regards. <br><br>Roelof<br><br>                                            </div></body>
</html>