module Requiring where import Missing -- Only return the result computation -- if there was at least `i` facts in -- the stream. requiring : Aggregate Int -> Aggregate a -> Aggregate (Possibly a) requiring i x = case count () < i of True then missing False then x