data Maybe a = Nothing | Just a
Basically all it means is, there's this data type called Maybe (remember, uppercase means constant) and when it is given a type it may just return it or it may return nothing!
This tool is one of the coolest things I have seen in Haskell, thus far. What is the power in this? You can make functions with expected behavior! For instance, consider this quick, binary search I built:
binarySearch :: Ord a => [a] -> a -> Int -> Int -> Maybe Int
binarySearch l e beg last
| lookat == e = Just i
| i == (length l)-1 || i == 0 = Nothing
| lookat < e = (binarySearch l e i last)
| lookat > e = (binarySearch l e beg i)
where i = quot (beg+last) 2
lookat = l !! i
The Maybe, Just and Nothing allow the function to be loose enough that the function can respond with ,"I couldn't find what you were looking for; I found nothing!" This seems to be a huge plus of Haskell. I don't know of many strongly-typed languages that allow this level of Dynamicity.