On 2005/04/16, at 12:57, Hamilton Richards wrote:
At 10:50 AM +0900 2005/4/16, Kaoru Hosokawa wrote:
My solution based on Bernie's solution:
init :: [a] - [a]
init xs = foldr (left (length xs)) xs xs
left :: Int - a - [a] - [a]
left n x xs
| n == length xs = []
| otherwise = x : xs
that works for Strings, but I am looking for a more
general solution. This exercise may yet again be one of those that is
difficult to solve with my current knowledge of Haskell, but I'm asking
anyway.
--
Kaoru Hosokawa
[EMAIL PROTECTED]
___
Haskell-Cafe
, but didn't work for
howManyOfFourEqual 4 4 2 2 = 3
Anyway the approach was similar to mine, and if I use isEqual I could
get a simpler solution.
Thanks again.
--
Kaoru Hosokawa
[EMAIL PROTECTED]
___
Haskell-Cafe mailing list
Haskell-Cafe
| otherwise = 2
I hope to find a better solution. I googled but couldn't find the
answer.
Kaoru Hosokawa
[EMAIL PROTECTED]
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
`goto'
machine.c:1791: syntax error, missing `;' after `*'
machine.c:1814: illegal statement, missing `identifier' after `goto'
machine.c:1814: syntax error, missing `;' after `*'
cpp-precomp: warning: errors during smart preprocessing, retrying in
basic mode
...
What should I do? Thanks.
Kaoru