<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Thanks. <br>
<br>
This does the job :<br>
<br>
import Data.Char<br>
<br>
x = map isLower "ABCde":[]<br>
-- Note that comments are preceded by two hyphens<br>
{- or enclosed<br>
in curly brace/hypens pairs. -}<br>
main = print x<br>
<br>
next "problem" Count the lowercase. So I have to filter them and
then look at the lenght. <br>
<br>
<br>
<br>
Roelof<br>
<br>
<br>
<br>
<br>
<br>
Vlatko Basic schreef op 2-3-2014 20:58:<br>
</div>
<blockquote cite="mid:53138D60.4030104@gmail.com" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
This is close, but string is not an object in Haskell.<br>
<br>
You have to Map aFunction over aString<br>
<br>
Take a look at signature for 'map'.<br>
map :: (a -> b) -> [a] -> [b]<br>
<br>
<br>
<br>
<blockquote style="border-left: 2px solid #330033 !important;
border-right: 2px solid #330033 !important; padding: 0px 15px
0px 15px; margin: 8px 2px;" cite="mid:53138B71.6040303@home.nl"
type="cite"><!--[if !IE]><DIV style="border-left: 2px solid #330033; border-right: 2px solid #330033; padding: 0px 15px; margin: 2px 0px;"><![endif]--><span
style="color:#000000;" class="headerSpan">
<div class="moz-cite-prefix">-------- Original Message
--------<br>
Subject: Re: [Haskell-beginners] where do i get wrong<br>
From: Roelof Wobben <a moz-do-not-send="true"
class="moz-txt-link-rfc2396E"
href="mailto:r.wobben@home.nl"><r.wobben@home.nl></a><br>
To: The Haskell-Beginners Mailing List - Discussion of
primarily beginner-level topics related to Haskell <a
moz-do-not-send="true" class="moz-txt-link-rfc2396E"
href="mailto:beginners@haskell.org"><beginners@haskell.org></a><br>
Date: 02.03.2014 20:50<br>
</div>
<br>
<br>
</span>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<div class="moz-cite-prefix">Correect, I forget to use map<br>
But also x = map "aBCde".islower does not work.<br>
<br>
I think I have to find out how I can ghci in fpcomplete or use
another IDE which supports it. <br>
<br>
Roelof<br>
<br>
<br>
<br>
Ryan Stradling schreef op 2-3-2014 20:44:<br>
</div>
<blockquote style="border-left: 2px solid #330033 !important;
border-right: 2px solid #330033 !important; padding: 0px 15px
0px 15px; margin: 8px 2px;"
cite="mid:CAFVzk8VNZd631A_yOxeHM=6QSg4Vc8bYyFO8BxmdkuWYgEFUkw@mail.gmail.com"
type="cite"><!--[if !IE]><DIV style="border-left: 2px solid #330033; border-right: 2px solid #330033; padding: 0px 15px; margin: 2px 0px;"><![endif]-->
<p dir="ltr">isLower takes a character. You need to look at
operating on the string with higher order functions which
will call isLower on each character.</p>
<div class="gmail_quote">On Mar 2, 2014 2:25 PM, "Roelof
Wobben" <<a moz-do-not-send="true"
href="mailto:r.wobben@home.nl">r.wobben@home.nl</a>>
wrote:<br type="attribution">
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<div>Found this one: <br>
<br>
This is partly working:<br>
<br>
import Data.Char<br>
<br>
x = "aBCde".isLower<br>
-- Note that comments are preceded by two hyphens<br>
{- or enclosed<br>
in curly brace/hypens pairs. -}<br>
main = print x<br>
<br>
<br>
But now I see this error: <span></span>
<div>
<div style="display:block">
<ul>
<li>
<div>
<div>Main.hs@3:5-3:12</div>
<div>Couldn't match expected type `b0 ->
c0' with actual type `[Char]' In the first
argument of `(.)', namely `"aBCde"' In the
expression: "aBCde" . isLower In an
equation for `x': x = "aBCde" . isLower</div>
</div>
</li>
<li>
<div>
<div>In an equation for `x': x = "aBCde" .
isLower<br>
</div>
</div>
</li>
</ul>
</div>
</div>
<br>
Roelof<br>
<br>
Roelof Wobben schreef op 2-3-2014 20:10:<br>
</div>
<blockquote style="border-left: 2px solid #330033
!important; border-right: 2px solid #330033
!important; padding: 0px 15px 0px 15px; margin: 8px
2px;" type="cite"><!--[if !IE]><DIV style="border-left: 2px solid #330033; border-right: 2px solid #330033; padding: 0px 15px; margin: 2px 0px;"><![endif]-->
<div>Thanks, <br>
<br>
isLower is in base package. <br>
The tutorial has not spoken about importing modules.<br>
<br>
I use the IDE of fpcomplete.<br>
<br>
Roelof<br>
<br>
<br>
<br>
Bob Ippolito schreef op 2-3-2014 20:02:<br>
</div>
<blockquote style="border-left: 2px solid #330033
!important; border-right: 2px solid #330033
!important; padding: 0px 15px 0px 15px; margin: 8px
2px;" type="cite"><!--[if !IE]><DIV style="border-left: 2px solid #330033; border-right: 2px solid #330033; padding: 0px 15px; margin: 2px 0px;"><![endif]-->
<div dir="ltr">isLower is not in the Prelude (the
automatically imported module built-in functions).
Here's the list of all functions in Prelude:
<div><a moz-do-not-send="true"
href="http://hackage.haskell.org/package/base/docs/Prelude.html"
target="_blank">http://hackage.haskell.org/package/base/docs/Prelude.html</a><br>
</div>
<div><br>
</div>
<div>isLower is in another module. You can figure
that out by searching for "isLower" on Hoogle:</div>
<div><a moz-do-not-send="true"
href="http://www.haskell.org/hoogle/"
target="_blank">http://www.haskell.org/hoogle/</a><br>
</div>
<div><br>
</div>
<div>You can even find it by searching for it by
type, which is useful if you don't remember the
precise name. Try searching for "Char ->
Bool".</div>
<div><br>
</div>
<div>In other words, you'll need to import isLower
from somewhere before you can use it.</div>
<div><br>
</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Sun, Mar 2, 2014 at
10:45 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>
I try to selfstudy haskell by following the
yet another haskell tutorial.<br>
<br>
Now I have the exercise where I have a string
and have to convert it into a list of
Booleans based on lower cats letter using map.<br>
<br>
So i tried this<br>
<br>
x = "aBCde".islower:[]<br>
<br>
But I see this error : Not in Scope:
'isLower'.<br>
<br>
Where do I make my error.<br>
<br>
Do not give the answer otherwise I do not
learn anything from it.<br>
<br>
Roelof<br>
<br>
<br>
---<br>
Dit e-mailbericht bevat geen virussen en
malware omdat avast! Antivirus-bescherming
actief is.<br>
<a moz-do-not-send="true"
href="http://www.avast.com" target="_blank">http://www.avast.com</a><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>
</div>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
Beginners mailing list
<a moz-do-not-send="true" href="mailto:Beginners@haskell.org" target="_blank">Beginners@haskell.org</a>
<a moz-do-not-send="true" href="http://www.haskell.org/mailman/listinfo/beginners" target="_blank">http://www.haskell.org/mailman/listinfo/beginners</a>
</pre>
<!--[if !IE]></DIV><![endif]--></blockquote>
<br>
<br>
<br>
<hr
style="border:none;color:#909090;background-color:#b0b0b0;min-height:1px;width:99%">
<table style="border-collapse:collapse;border:none">
<tbody>
<tr>
<td style="border:none;padding:0px 15px 0px 8px">
<a moz-do-not-send="true"
href="http://www.avast.com/" target="_blank">
<img moz-do-not-send="true"
src="http://static.avast.com/emails/avast-mail-stamp.png"
border="0"> </a> </td>
<td>
<p
style="color:#3d4d5a;font-family:"Calibri","Verdana","Arial","Helvetica";font-size:12pt">
Dit e-mailbericht bevat geen virussen en
malware omdat <a moz-do-not-send="true"
href="http://www.avast.com/"
target="_blank">avast! Antivirus</a>
actief is. </p>
</td>
</tr>
</tbody>
</table>
<br>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
Beginners mailing list
<a moz-do-not-send="true" href="mailto:Beginners@haskell.org" target="_blank">Beginners@haskell.org</a>
<a moz-do-not-send="true" href="http://www.haskell.org/mailman/listinfo/beginners" target="_blank">http://www.haskell.org/mailman/listinfo/beginners</a>
</pre>
<!--[if !IE]></DIV><![endif]--></blockquote>
<br>
<br>
<br>
<hr
style="border:none;color:#909090;background-color:#b0b0b0;min-height:1px;width:99%">
<table style="border-collapse:collapse;border:none">
<tbody>
<tr>
<td style="border:none;padding:0px 15px 0px 8px">
<a moz-do-not-send="true"
href="http://www.avast.com/" target="_blank">
<img moz-do-not-send="true"
src="http://static.avast.com/emails/avast-mail-stamp.png"
border="0"> </a> </td>
<td>
<p
style="color:#3d4d5a;font-family:"Calibri","Verdana","Arial","Helvetica";font-size:12pt">
Dit e-mailbericht bevat geen virussen en
malware omdat <a moz-do-not-send="true"
href="http://www.avast.com/" target="_blank">avast!
Antivirus</a> actief is. </p>
</td>
</tr>
</tbody>
</table>
<br>
</div>
<br>
_______________________________________________<br>
Beginners mailing list<br>
<a moz-do-not-send="true"
href="mailto:Beginners@haskell.org">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>
<br>
</blockquote>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Beginners mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Beginners@haskell.org">Beginners@haskell.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.haskell.org/mailman/listinfo/beginners">http://www.haskell.org/mailman/listinfo/beginners</a>
</pre>
<!--[if !IE]></DIV><![endif]--></blockquote>
<br>
<br>
<br>
<hr style="border:none; color:#909090; background-color:#B0B0B0;
height: 1px; width: 99%;">
<table style="border-collapse:collapse;border:none;">
<tbody>
<tr>
<td style="border:none;padding:0px 15px 0px 8px"> <a
moz-do-not-send="true" href="http://www.avast.com/"> <img
moz-do-not-send="true"
src="http://static.avast.com/emails/avast-mail-stamp.png"
border="0"> </a> </td>
<td>
<p style="color:#3d4d5a;
font-family:"Calibri","Verdana","Arial","Helvetica";
font-size:12pt;"> Dit e-mailbericht bevat geen
virussen en malware omdat <a moz-do-not-send="true"
href="http://www.avast.com/">avast! Antivirus</a>
actief is. </p>
</td>
</tr>
</tbody>
</table>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Beginners mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Beginners@haskell.org">Beginners@haskell.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.haskell.org/mailman/listinfo/beginners">http://www.haskell.org/mailman/listinfo/beginners</a>
</pre>
<!--[if !IE]></DIV><![endif]--></blockquote>
<br>
<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>
<br /><br />
<hr style='border:none; color:#909090; background-color:#B0B0B0; height: 1px; width: 99%;' />
<table style='border-collapse:collapse;border:none;'>
<tr>
<td style='border:none;padding:0px 15px 0px 8px'>
<a href="http://www.avast.com/">
<img border=0 src="http://static.avast.com/emails/avast-mail-stamp.png" />
</a>
</td>
<td>
<p style='color:#3d4d5a; font-family:"Calibri","Verdana","Arial","Helvetica"; font-size:12pt;'>
Dit e-mailbericht bevat geen virussen en malware omdat <a href="http://www.avast.com/">avast! Antivirus</a> actief is.
</p>
</td>
</tr>
</table>
<br />
</body>
</html>