diff --git a/part1.html b/part1.html index af7676f..ac48ce6 100644 --- a/part1.html +++ b/part1.html @@ -241,7 +241,7 @@ code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warni
Pattern matching – defining functions based on cases that correspond to your data definitions:
area Point = 0
area (Rectangle width height) = width * height
-area (Circle radius) = 2 * pi * radius * radiusLists – Unlike many languages, Haskell has a concise built-in syntax for lists. Lists can be built from other lists using list comprehensions. Here’s a snippet that generates names of even length from a set of options for first and last names:
[whole | first <- ["Eva", "Mike"],
last <- ["Smith", "Wood", "Odd"],