Difference between revisions of "FP Solution"

From Marek Běhálek Wiki
Jump to navigation Jump to search
 
(3 intermediate revisions by the same user not shown)
Line 7: Line 7:
  
  
----
 
Soluiton
 
 
<div class="mw-collapsible mw-collapsed" data-collapsetext="Hide solution" data-expandtext="Show solution">
 
<div class="mw-collapsible mw-collapsed" data-collapsetext="Hide solution" data-expandtext="Show solution">
 
Some text in the div here.
 
Some text in the div here.
Line 21: Line 19:
  
 
<div style="clear:both;"></div>
 
<div style="clear:both;"></div>
----
 
  
<big>''' Collapsible table-cell content in a table'''</big>
+
<div class="toccolours mw-customtoggle-myList">Show solution</div>
----
 
  
<table class="wikitable">
+
<div class=" mw-collapsible mw-collapsed" id="mw-customcollapsible-myList">
<tr>
+
Some text in the div here.
<th>X</th> <th>Y</th> <th>Z</th>
+
<syntaxhighlight lang="Haskell">
</tr>
+
fact1 :: Int -> Int
<tr>
+
fact1 0 = 1
<td>Hi, the content in the cell below me is collapsible and collapsed by default</td> <td>35</td> <td>91</td>
+
fact1 n = n * fact1 (n-1)
</tr>
 
<tr>
 
<td class="mw-collapsible mw-collapsed">I'm the mw-collapsible cell content!</td> <td>42</td> <td>63</td>
 
</tr>
 
</table>
 
  
<div style="clear:both"></div>
+
</syntaxhighlight>
 
+
Some more text in the div.
 
+
</div>
<big>''' Custom collapsible 3 (list)'''</big>
 
----
 
 
 
<div class="usermessage mw-customtoggle-myList">Click here to toggle the list.</div>
 
 
 
<ul class="mw-collapsible" id="mw-customcollapsible-myList">
 
<li>A</li>
 
<li>B</li>
 
<li>C</li>
 
<li>D</li>
 
</ul>
 
  
 
<div style="clear:both"></div>
 
<div style="clear:both"></div>

Latest revision as of 10:45, 23 September 2020

fact1 :: Int -> Int
fact1 0 = 1
fact1 n = n * fact1 (n-1)


Some text in the div here.

fact1 :: Int -> Int
fact1 0 = 1
fact1 n = n * fact1 (n-1)

Some more text in the div.

Show solution

Some text in the div here.

fact1 :: Int -> Int
fact1 0 = 1
fact1 n = n * fact1 (n-1)

Some more text in the div.