<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">Hello,</div><div class="gmail_quote"><br></div><div class="gmail_quote">2014-03-02 20:50 GMT+01:00 Roelof Wobben <span dir="ltr"><<a href="mailto:r.wobben@home.nl" target="_blank">r.wobben@home.nl</a>></span>:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <div>Correect, I forget to use map<br>
      But also x = map "aBCde".islower does not work.<br>
      <br></div></div></blockquote><div>Your use of the dot (.) function makes me think you might mix Haskell syntax with OO languages like Python or Java where dot notation is used to call methods on objects.</div><div>

<br></div><div>Also, as Emanuel and Vlatko pointed out one very important thing in Haskell is reading type signatures. So, let's check `map` signature:</div><div><br></div><div>    map :: (a -> b) -> [a] -> [b]</div>

<div><br></div><div>What does this mean?</div><div>Although all Haskell functions take one and only one argument we probably might find it simpler to reason in terms of first argument, second argument and return value (`map` should probably be better described as a function that takes a function from `a` to `b` and returns a function from [a] to [b]).</div>

<div><br></div><div>Anyway.</div><div><br></div><div>The first argument is (a -> b), a function from `a` to `b`.</div><div>The second argument is [a], i.e. a list of `a` (`a` can potentially represent any type).</div>
<div>
The last type in the signature is [b] which we might call the return type. Again, haskellers, don't stab me please :) </div><div><br></div><div>Now check the type signature for `isLower`:</div><div><br></div><div>    isLower :: Char -> Bool</div>

<div><br></div><div>`isLower` will be `map`'s first argument, so, replacing the original (a -> b) with isLower type signature, you'll get:</div><div><br></div><div>    map :: (Char -> Bool) -> [Char] -> [Bool]</div>

<div><br></div><div>A step further, the signature then becomes:<br></div><div><br></div><div>    map isLower :: [Char] -> [Bool]</div><div><br></div><div>As you can see here, understanding that all functions in Haskell takes just one argument helps because `map isLower` is in turn a function. The result of calling `map` with `isLower` as its (first and only) argument, is a function from [a], or, better, from [Char], since Char is the (first and only) argument of `isLower`, to [b], or, better, to [Bool] since Bool is the return type of `isLower`.</div>

<div><br></div><div>Now we have map isLower which takes a [Char]. [Char] and String are synonyms, by the way, so you could also write `map isLower` signature as follows:</div><div><div><br class="">    map isLower :: String -> [Bool]</div>

</div><div><br></div><div>This seems exactly what we need: a function from String to a list of booleans.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<div text="#000000" bgcolor="#FFFFFF"><div>
      I think I have to find out how I can ghci in fpcomplete or use
      another IDE which supports it. <br>
      <br>
      Roelof<br></div></div></blockquote><div><br></div><div>Have you read/are you reading "Learn you a Haskell" (<a href="http://learnyouahaskell.com/chapters">http://learnyouahaskell.com/chapters</a>)? I'd advise you to read it, as it helps you, in the beginning, being more confortable with Haskell's syntax and library.</div>

<div><br></div><div>--</div></div><div dir="ltr">Nadir<br></div>
</div></div>