Hi I am abit new to this language though I manage to study it very fast and understand it well. I have some tutorials to do inorder to practice it. The thing is I want to declear some functions but to do that I need to understand how exactly "take" works in hugs. Couse I want to build a similar function but I don't know how I will continue:

this is where I reach

take :: Integer -> [Integer] -> [Integer]
take _ [] = []
take n xs 
      |x < lenghtList xs = (take (n-1) xs :[])
      |otherwise = xs

I have decleared lenghtList before. I am not going to discuse lenght now couse it is easy and not for the scope of what I need. I know that what I did up there is completly wrong but that is what I came out while trying to understand how would the interpreter read and implement this. If you have any ideas how this function works please explain me I would be very greatfull.I have to do a similar one but to do it I have to understand this one. If u try it in hugs u will realise it is an allready decleared function but what I need is to understand how it works.What it must do is to get a num and a list and to display the elements of the list till the nth element which is the number we have given.if the list is smaller in lenght then the given num we return the whole list. Thanks in advance to all the folks who do help me please :(( !
<br><hr align="left" width="300">
View this message in context: <a href="http://www.nabble.com/Need-help-of-explanation-possible%21%21%21-Pls-tf3282642.html#a9131026">Need help of explanation possible!!! Pls</a><br>
Sent from the <a href="http://www.nabble.com/Haskell---Haskell-Cafe-f13132.html">Haskell - Haskell-Cafe mailing list archive</a> at Nabble.com.<br>