on master help sign in
Update countDistinct doc
7100d5dHarendra Kumar
core/src/Streamly/Internal/Data/Fold.hs+2
@@ -570,6 +570,8 @@ length = genericLength
570
570
571-- | Count non-duplicate elements in the stream.
571-- | Count non-duplicate elements in the stream.
572--
572--
573+-- Equivalent to using 'nub' followed by 'length' on a stream.
574+--
573-- The memory used is proportional to the number of distinct elements in the
575-- The memory used is proportional to the number of distinct elements in the
574-- stream, to guard against using too much memory use it as a scan and
576-- stream, to guard against using too much memory use it as a scan and
575-- terminate if the count reaches more than a threshold.
577-- terminate if the count reaches more than a threshold.