This is a test of literate haskell

21-06-13–21-06-13
    • This is a test of pandoc’s literate haskell capabilities tecnically this is considered a haskell file.

      toDigits :: Integer -> [Integer]
      toDigits n 
        | n <= 0 = []
         | otherwise = toDigits (div n 10) + [mod n 10]
      
      toDigitsRev :: Integer -> [Integer]
      toDigitsRev n = reverse (toDigits n)

      did it work?