Greatest common divisor: Difference between revisions

Added Frege example for GCD
No edit summary
(Added Frege example for GCD)
Line 968:
=={{header|Free Pascal}}==
See [[#Pascal / Delphi / Free Pascal]].
 
=={{header|Frege}}==
<lang fsharp>module gcd.GCD where
 
pure native parseInt java.lang.Integer.parseInt :: String -> Int
 
gcd' a 0 = a
gcd' a b = gcd' b (a `mod` b)
 
main args = do
(a:b:_) = args
println $ gcd' (parseInt a) (parseInt b)
</lang>
 
=={{header|F_Sharp|F#}}==
Anonymous user