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: filter
Type: (a -> Bool) -> [a] -> [a]
Description: returns a list constructed from members of a list (the second argument) fulfilling a condition given by the first argument
Related:
Keywords: list construction

Example 1

Input: filter (>5) [1,2,3,4,5,6,7,8]

Output: [6,7,8]

Example 2

Input: filter odd [3,6,7,9,12,14]

Output: [3,7,9]

Example 3

Input: filter (\x -> length x > 4) ["aaaa","bbbbbbbbbbbbb","cc"]

Output: ["bbbbbbbbbbbbb"]




_____________________________________________
Reference Search | Sitemap | XML Glossary       ZVON | Systinet




Related sites:
  • dotNet Slackers - Your latest resource for ASP.NET
  • Dotnet Spider - Outsourcing and Offshore software development in India
  • XML - Xselerator, XSL Editor, BizTalk Utilities, XML Tutorials, Learn XML
  • Planet Source Code - The largest public source code database on the Internet
answering service water softener MSN Alojamiento Web UNLIMITED Web Hosting by HostDepartment
VoIP Internettelefonie Hosted Exchange, SDSL VoIP Internettelefonie AT VoIP Internettelefonie DE