Skip to content

Commit ff9d82b

Browse files
committed
Generalise and, or documentation
1 parent 59b33b3 commit ff9d82b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/Data/Foldable.purs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,11 +197,15 @@ intercalate sep xs = (foldl go { init: true, acc: mempty } xs).acc
197197
go { init = true } x = { init: false, acc: x }
198198
go { acc = acc } x = { init: false, acc: acc <> sep <> x }
199199

200-
-- | Test whether all `Boolean` values in a data structure are `true`.
200+
-- | The conjunction of all the values in a data structure. When specialized
201+
-- | to `Boolean`, this function will test whether all of the values in a data
202+
-- | structure are `true`.
201203
and :: forall a f. (Foldable f, BooleanAlgebra a) => f a -> a
202204
and = all id
203205

204-
-- | Test whether any `Boolean` value in a data structure is `true`.
206+
-- | The disjunction of all the values in a data structure. When specialized
207+
-- | to `Boolean`, this function will test whether any of the values in a data
208+
-- | structure is `true`.
205209
or :: forall a f. (Foldable f, BooleanAlgebra a) => f a -> a
206210
or = any id
207211

0 commit comments

Comments
 (0)