ZVON > References > Haskell reference
| Indexes | Syntax | >> Prelude << | Ratio | Complex | Numeric | Ix | Array | List | Maybe | Char | Monad | IO | Directory | System | Time | Locale | CPUTime | Random

Module: Prelude
Function: length
Type: [a] -> Int
Description: returns te number of items in a list
Related: null
Keywords: length, list

Example 1

Input: length [1,2,3]

Output: 3

Example 2

Input: length []

Output: 0

Example 3

Input: length "Hello"

Output: 5