-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmathToHaskellComparison.html
More file actions
81 lines (81 loc) · 1.69 KB
/
Copy pathmathToHaskellComparison.html
File metadata and controls
81 lines (81 loc) · 1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<!DOCTYPE HTML>
<html>
<head>
<title>Math→Haskell</title>
<link rel="stylesheet" href="haskelltalk.css" type="text/css">
</head>
<body>
<div id="navigation">
<a href="outline.html"> Outline </a>
</div>
<h1>Haskell's Math inspired Syntax/Semantics</h1>
<table id="math-to-haskell-chart" cellpadding="0" cellspacing="0">
<tr>
<th>
Concept or Function
</th>
<th>
Math Notiation
</th>
<th>
Haskell Code
</th>
</tr>
<tr>
<td>
Not Equal To
</td>
<td>
≠
</td>
<td>
<pre>/=</pre>
</td>
</tr>
<tr>
<td>
Lambda
</td>
<td>
λ<em>x</em> = <em>x</em> +<em>x</em>
</td>
<td>
<pre>\x = x+x</pre>
</td>
</tr>
<tr>
<td>
Function Definitions (types)
</td>
<td>
<table class="function-def" cellpadding="0" cellspacing="0" >
<tr>
<td colspan="3">
ƒ
</td>
</tr>
<tr>
<td>ℤ</td>
<td>→</td>
<td>ℤ</td>
</tr>
</table>
</td>
<td>
<pre>f::Int->Int</pre>
</td>
</tr>
<tr>
<td>
List Comprehensions (set definitions)
</td>
<td>
{ <em>x</em> | <em>x</em> ∈ ℕ, <em>x</em> mod 2 = 0 }
</td>
<td>
<pre>[ x | x <- [1..], x `mod` 2 == 0]</pre>
</td>
</tr>
</table>
</body>
</html>