Extreme value theory aims at estimating the probability of an event (usually some kind of disastrous event) even when this event has never taken place, using the size of events of extreme but not disastrous nature that have indeed occurred in the past. The necessary theory for this purpose is well known in the situation when the observations are real numbers or vectors of numbers. Here the theory is developed in the situation when the observations consist of functions, that is infinitely many numbers. For example the observations could be the water level along a coastline at certain time points and the problem considered the probability of a flood, i.e. the probability that the water level exceeds the coast defence at any point along the coastline.