Difference between revisions of "FP Solution"
Jump to navigation
Jump to search
(6 intermediate revisions by the same user not shown) | |||
Line 7: | Line 7: | ||
− | |||
− | |||
<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> | ||
− | |||
− | < | + | <div class="toccolours mw-customtoggle-myList">Show solution</div> |
− | |||
− | < | + | <div class=" mw-collapsible mw-collapsed" id="mw-customcollapsible-myList"> |
− | + | Some text in the div here. | |
− | + | <syntaxhighlight lang="Haskell"> | |
− | + | fact1 :: Int -> Int | |
− | + | fact1 0 = 1 | |
− | + | fact1 n = n * fact1 (n-1) | |
− | < | ||
− | |||
− | |||
− | |||
− | |||
− | + | </syntaxhighlight> | |
− | + | Some more text in the div. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
</div> | </div> | ||
<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.