<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Oke, <br>
<br>
So I can do this when adding a center point. <br>
<br>
Data schape = Circle float (float,float) <br>
| Rectange float float (float, float) <br>
<br>
Roelof<br>
<br>
<br>
<br>
Op 7-11-2015 om 23:03 schreef Alex Belanger:<br>
</div>
<blockquote
cite="mid:CADSky2x9RJonNaFEfE4Yupc3t_j3CGn1fW6+GNQ-XK0uhBt8ng@mail.gmail.com"
type="cite">
<p dir="ltr">I feel the latter example serves only documentation
purposes. Maybe describe what those floats are in the former
example and you can ignore the extra type aliases entirely.</p>
<p dir="ltr">Introducing a new concern for your module/application
when it appears only once might just add extra complexity.</p>
<p dir="ltr">Of course, as the codebase grows and this datatype
evolves, you'll probably want to go that route, but until then,
I think it's preemptively unecessery.</p>
<p dir="ltr">- nitrix</p>
<div class="gmail_quote">On Nov 7, 2015 4:56 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">Hello,<br>
<br>
In the book there is a example of this data-structure.<br>
<br>
data Shape = Circle float float<br>
| Rectangle float float<br>
<br>
Now I have to change it to add a center point.<br>
<br>
But I wonder if this is not a better way to describe it<br>
<br>
Data Schape = Circle Radius<br>
| Rectangle Width Height<br>
<br>
Type Radius = Float<br>
type Width = Float<br>
type Height = Float<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://mail.haskell.org/cgi-bin/mailman/listinfo/beginners"
rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners</a><br>
</blockquote>
</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://mail.haskell.org/cgi-bin/mailman/listinfo/beginners">http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners</a>
</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<p class="" avgcert""="" color="#000000" align="left">Geen virus
gevonden in dit bericht.<br>
Gecontroleerd door AVG - <a moz-do-not-send="true"
href="http://www.avg.com">www.avg.com</a><br>
Versie: 2015.0.6173 / Virusdatabase: 4457/10963 - datum van
uitgifte: 11/07/15</p>
</blockquote>
<br>
</body>
</html>