Personal tools

McCarthy91

From HaskellWiki

Revision as of 06:37, 16 November 2006 by DonStewart (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
mccarthy91 n = 
    if n <= 100
    then (mccarthy91.mccarthy91.(+11)) n 
    else n - 10

or with guards:

mccarthy91 n | n <= 100  = mccarthy91 . mccarthy91 . (+11) $ n
             | otherwise = n - 10