News for hackers. Stuff that matters.
Re:Clean – A functional programming language by mrkgnao on Saturday December 16, 2017 @10:17AM (#15939873)
In Haskell:

    fac :: Int -> Int
    fac x = case x of
      0 -> 1
      n -> n * fac (n-1)
or even

    {-# LANGUAGE LambdaCase #-}

    fac :: Int -> Int
    fac = \case
      0 -> 1
      n -> n * fac (n-1)

There are no comments on this comment yet.