ZVON > References > Haskell reference |
Intro / Search / ZVON |
| Indexes | Syntax | >> Prelude << | Ratio | Complex | Numeric | Ix | Array | List | Maybe | Char | Monad | IO | Directory | System | Time | Locale | CPUTime | Random |
Module: | Prelude |
---|---|
Function: | lookup |
Type: | Eq a => a -> [(a,b)] -> Maybe b |
Description: | |
Related: |
Input: lookup 'c' [('a',0),('b',1),('c',2)]
Output: Just 2
Input: lookup 'c' [('a',0),('b',1),('c',2),('a',3),('b',4),('c',5)]
Output: Just 2
Input: lookup 'f' [('a',0),('b',1),('c',2)]
Output: Nothing