query
On this page

oneOf

lib.types.oneOf

Docs pulled from | This Revision | about 3 hours ago


Any of the types in the given list


Noogle detected

Implementation

The following is the current implementation of this function.

oneOf =
        ts:
        let
          head' =
            if ts == [ ] then throw "types.oneOf needs to get at least one type in its argument" else head ts;
          tail' = tail ts;
        in
        foldl' either head' tail';