Hi,Thanks all. I learnt quite a few things:1. There was already an equivalent builtin function.2. That the best function argument order is the least surprising one.3. That I can choose my preferred function order by changing the name of the function.
4. That the most efficient way of doing
John Ky wrote:
Hello,
I have this function here:
endsWith :: Eq a = [a] - [a] - Bool
endsWith suffix list
| lengthDifference 0 = False
| otherwise = (drop lengthDifference list) == suffix
where lengthDifference = (length list) - (length suffix)
I thinks that's what
On 10/21/06, Stephan Walter [EMAIL PROTECTED] wrote:
John Ky wrote:
Hello,
I have this function here:
endsWith :: Eq a = [a] - [a] - Bool
endsWith suffix list
| lengthDifference 0 = False
| otherwise = (drop lengthDifference list) == suffix
where lengthDifference = (length list)