X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2FMisc.hs;h=48482b4f69a2cfe580b8b34a605beae82565168b;hb=effb6b9a8716ce58fed6c8260c57164601a7df30;hp=b2ebeef53c42e470af7e12c58e5e55fdeac74a10;hpb=ea3ca20238de85d8ff927163bc14945fcbdb3d13;p=spline3.git diff --git a/src/Misc.hs b/src/Misc.hs index b2ebeef..48482b4 100644 --- a/src/Misc.hs +++ b/src/Misc.hs @@ -7,6 +7,15 @@ where -- | The standard factorial function. See -- for -- possible improvements. +-- +-- Examples: +-- +-- >>> factorial 0 +-- 1 +-- +-- >>> factorial 4 +-- 24 +-- factorial :: Int -> Int factorial n | n <= 1 = 1