Pattern Matching - Filtering Data With Patterns

Filtering Data With Patterns

Pattern matching can be used to filter data of a certain structure. For instance, in Haskell a list comprehension could be used for this kind of filtering:

]

evaluates to

Read more about this topic:  Pattern Matching

Famous quotes containing the words data and/or patterns:

    To write it, it took three months; to conceive it three minutes; to collect the data in it—all my life.
    F. Scott Fitzgerald (1896–1940)

    Persons grouped around a fire or candle for warmth or light are less able to pursue independent thoughts, or even tasks, than people supplied with electric light. In the same way, the social and educational patterns latent in automation are those of self- employment and artistic autonomy.
    Marshall McLuhan (1911–1980)