S SmartDocs
Series: haskell haskell 5 lines · Updated 2026-02-03

ListFunctions.hs

haskell/ListFunctions.hs

module ListFunctions where

lengthList :: [Integer] -> Integer
lengthList []     = 0
lengthList (_:xs) = 1 + lengthList xs

Related articles