<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Thanks, <br>
      <br>
      I already found the answer. <br>
      The problem is that I use the wrong clauses and the wrong approach
      to recursion.<br>
      <br>
      Roelof<br>
      <br>
      <br>
      <br>
      Joel Neely schreef op 7-2-2015 om 14:42:<br>
    </div>
    <blockquote
cite="mid:CAEEzXAjSEykjj4h2vGRY-Sp+0hS6miYRhe9AP7RSMVmOEh=mGg@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div class="gmail_default"
          style="font-family:georgia,serif;font-size:small">Question/hint:
           You refer to acc three times, all in the right-hand-side
          expressions. Where is acc defined?</div>
        <div class="gmail_default"
          style="font-family:georgia,serif;font-size:small"><br>
        </div>
        <div class="gmail_default"
          style="font-family:georgia,serif;font-size:small">-jn-</div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Sat, Feb 7, 2015 at 2:53 AM, Roelof
          Wobben <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:r.wobben@home.nl" target="_blank">r.wobben@home.nl</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
            <br>
            The exercises of CIS 194 are really hard.<br>
            <br>
            Now I have to sum all the numbers in a array with a catch<br>
            If a number is greater then 10 it has to be dived in single
            numbers.<br>
            <br>
            so [ 1 , 12, 3] will be [ 1, 1,2,3] and then sum up.<br>
            <br>
            So far I have this :<br>
            <br>
            -- | sum all the digits of a array<br>
            sumDigits :: [Integer] -> Integer<br>
            sumDigits n<br>
               | n == 0 = acc<br>
               | n < 10 = acc + n<br>
               | otherwise = sumDigits acc + n `mod` 10 + n `rem` 10<br>
            <br>
            <br>
            But now I see a message that acc is not known which is not
            wierd.<br>
            <br>
            But when I do sumDigits n acc I see a message that sumDigits
            has only 1 parameter where I give it to,<br>
            <br>
            When I only had to sum up i is easy , I could use map [+] xs<br>
            <br>
            Anyone  who can give a me tip without giving the answer
            otherwise I do not learn anything.<br>
            <br>
            Roelof<br>
            <br>
            _______________________________________________<br>
            Beginners mailing list<br>
            <a moz-do-not-send="true"
              href="mailto:Beginners@haskell.org" target="_blank">Beginners@haskell.org</a><br>
            <a moz-do-not-send="true"
              href="http://www.haskell.org/mailman/listinfo/beginners"
              target="_blank">http://www.haskell.org/mailman/listinfo/beginners</a><br>
          </blockquote>
        </div>
        <br>
        <br clear="all">
        <div><br>
        </div>
        -- <br>
        <div class="gmail_signature">Beauty of style and harmony and
          grace and good rhythm depend on simplicity. - Plato</div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Beginners mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Beginners@haskell.org">Beginners@haskell.org</a>
<a class="moz-txt-link-freetext" href="http://www.haskell.org/mailman/listinfo/beginners">http://www.haskell.org/mailman/listinfo/beginners</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>