oneOf
lib.types.oneOf
Docs pulled from | This Revision | 43 minutes 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';