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

Module: Maybe
Function: listToMaybe
Type: [a] -> Maybe a
Description: If the argument is an empty list, it returns Nothing, othervise it returns Just with the value of the first list item.
Related: maybeToList

Example 1

Input: listToMaybe [1,2,3,4]

Output: Just 1

Example 2

Input: listToMaybe ""

Output: Nothing




_____________________________________________
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
UNLIMITED Web Hosting by HostDepartment Alojamiento Web UK Domain Names glossary for conference call answering service
MSN VoIP Internettelefonie AT VoIP Internettelefonie DE VoIP Internettelefonie Hosted Exchange, SDSL