-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
56 lines (47 loc) · 2.54 KB
/
index.html
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
<!DOCTYPE html>
<html>
<head>
<title>nhpip github</title>
<style>
body {
font-family: Arial, sans-serif;
}
</style>
<meta name="google-site-verification" content="5WhvfP2kXnFrgdXaHv3wMyiUBj2BsuNlTVmWeStgsu4" />
<meta name="viewport" content="width=device-width, initial-scale=0.8">
</head>
<body background="./images/csimage1.jpeg", style="margin:20;padding:10">
<p><br><p>
<h1 style="color:#03b0fb;margin:30px;">Welcome to nhpip's github projects</h1>
<p style="color:#88d4d5;margin:40px;">Hi, I’m @nhpip
<br><br>Current interests are functional languages (Erlang / Elixir) and learning Haskell</p>
<h3 style="color:#03b0fb;margin:40px;">Currying and Partial Application in Elixir</h3>
<p style="color:#88d4d5;margin:40px;">
Currying is the process by which a function with an arity of N is turned into N functions <br>
each with an arity of 1. For example:</p>
<p>
<code style="margin:60px;background-color:#88d4d5; padding: 10px; font-size: 105%;"<br>x = f(a,b,c)</code>
<br><br><span style="color:#88d4d5;margin:40px;">Becomes:</span><br><br>
<code style="margin:60px;background-color:#88d4d5; padding: 10px; font-size: 105%;"<br>h = g(a); i = h(b); x = i(c)</code></p>
<p style="color:#88d4d5;margin:40px;">
Partial application involves taking a function of N arguments; initially calling it with X<br> arguments and then again
with the remaining arguments. For example:</p>
<p>
<code style="margin:60px;background-color:#88d4d5; padding: 10px; font-size: 105%;"<br>x = f(a,b,c,d,e)</code>
<br><br><span style="color:#88d4d5;margin:40px;">Becomes:</span><br><br>
<code style="margin:60px;background-color:#88d4d5; padding: 10px; font-size: 105%;"<br>h = g(a,b,c); x = h(d,e)</code></p>
<p><br>
<a style="color:#88d4d5;margin:40px;" href="https://github.com/nhpip/curry-elixir"><b>https://github.com/nhpip/curry-elixir</a>
<div style="margin:40px; width: 587px; height: 400px; overflow-y: scroll; scrollbar-color: #03b0fb #88d4d5;">
<img src="./images/curry.jpg" alt="Variadic">
</div>
<br>
</p>
<h3 style="color:#03b0fb;margin:40px;">Variadic Functions in Elixir</h3>
<p style="color:#88d4d5;margin:40px;">Functions that can take an arbritary number of arguments.</p>
<a style="color:#88d4d5;margin:40px;" href="https://github.com/nhpip/variadic-elixir"><b>https://github.com/nhpip/variadic-elixir</a>
<div style="margin:40px; width: 587px; height: 400px; overflow-y: scroll; scrollbar-color: #03b0fb #88d4d5;">
<img src="./images/variadic.jpg" alt="Variadic">
</div>
</body>
</html>