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

Module: List
Function: partition
Type: (a -> Bool) -> [a] -> ([a],[a])
Description: takes a predicate and a list and returns a pair of lists: those elements of the argument list that do and do not satisfy the predicate, respectively.
Related: group, groupBy, inits, intersperse, mapAccumL, mapAccumR, nub, nubBy, sort, sortBy, tails, transpose
Keywords: split

Example 1

Input: partition (>3) [1,5,2,4,3]

Output: ([5,4],[1,2,3])

Example 2

Input: partition (==6) [1,5,2,4,3]

Output: ([],[1,5,2,4,3])

Example 3

Input: partition odd [1,5,2,4,3]

Output: ([1,5,3],[2,4])




_____________________________________________
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