diff options
Diffstat (limited to 'gemfeed/2010-04-09-standard-ml-and-haskell.html')
| -rw-r--r-- | gemfeed/2010-04-09-standard-ml-and-haskell.html | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gemfeed/2010-04-09-standard-ml-and-haskell.html b/gemfeed/2010-04-09-standard-ml-and-haskell.html index 276d4c1d..84ae1fc7 100644 --- a/gemfeed/2010-04-09-standard-ml-and-haskell.html +++ b/gemfeed/2010-04-09-standard-ml-and-haskell.html @@ -8,7 +8,7 @@ <link rel="stylesheet" href="style-override.css" /> </head> <body> -<h1 style='display: inline'>Standard ML and Haskell</h1><br /> +<h1 style='display: inline' id='StandardMLandHaskell'>Standard ML and Haskell</h1><br /> <br /> <span class='quote'>Published at 2010-04-09T22:57:36+01:00</span><br /> <br /> @@ -18,7 +18,7 @@ <br /> <span>Haskell is also a "pure functional" programming language, whereas SML also makes explicit use of imperative concepts. I am by far not a specialist in either of these languages, but here are a few functions implemented in both SML and Haskell:</span><br /> <br /> -<h2 style='display: inline'>Defining a multi-data type</h2><br /> +<h2 style='display: inline' id='Definingamultidatatype'>Defining a multi-data type</h2><br /> <br /> <span>Standard ML:</span><br /> <br /> @@ -45,7 +45,7 @@ http://www.gnu.org/software/src-highlite --> <b><font color="#0000FF">deriving</font></b> <font color="#009900">Show</font> </pre> <br /> -<h2 style='display: inline'>Processing a multi</h2><br /> +<h2 style='display: inline' id='Processingamulti'>Processing a multi</h2><br /> <br /> <span>Standard ML:</span><br /> <br /> @@ -74,7 +74,7 @@ test_number w <font color="#990000">=</font> number <font color="#990000">(</fon <font color="#990000">(</font><font color="#009900">Union</font> <font color="#990000">(</font><font color="#009900">Union</font> <font color="#990000">(</font><font color="#009900">Elem</font> <font color="#993399">4</font><font color="#990000">)</font> <font color="#990000">(</font><font color="#009900">Elem</font> <font color="#993399">4</font><font color="#990000">))</font> <font color="#009900">Empty</font><font color="#990000">))))</font> w </pre> <br /> -<h2 style='display: inline'>Simplify function</h2><br /> +<h2 style='display: inline' id='Simplifyfunction'>Simplify function</h2><br /> <br /> <span>Standard ML:</span><br /> <br /> @@ -116,7 +116,7 @@ http://www.gnu.org/software/src-highlite --> simplify x <font color="#990000">=</font> x </pre> <br /> -<h2 style='display: inline'>Delete all</h2><br /> +<h2 style='display: inline' id='Deleteall'>Delete all</h2><br /> <br /> <span>Standard ML:</span><br /> <br /> @@ -145,7 +145,7 @@ http://www.gnu.org/software/src-highlite --> delete_all’ x <font color="#990000">=</font> x </pre> <br /> -<h2 style='display: inline'>Delete one</h2><br /> +<h2 style='display: inline' id='Deleteone'>Delete one</h2><br /> <br /> <span>Standard ML:</span><br /> <br /> @@ -191,7 +191,7 @@ http://www.gnu.org/software/src-highlite --> delete_one’ x <font color="#990000">=</font> <font color="#990000">(</font>x<font color="#990000">,</font> <font color="#009900">False</font><font color="#990000">)</font> </pre> <br /> -<h2 style='display: inline'>Higher-order functions</h2><br /> +<h2 style='display: inline' id='Higherorderfunctions'>Higher-order functions</h2><br /> <br /> <span>The first line is always the SML code, the second line the Haskell variant:</span><br /> <br /> |
