Skip to content

Commit 3abc134

Browse files
authored
add another example to intercalate docs
1 parent d30146e commit 3abc134

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Data/Foldable.purs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,9 @@ oneOfMap f = foldr (alt <<< f) empty
249249
-- |
250250
-- | > intercalate "*" ["a", "b", "c"]
251251
-- | = "a*b*c"
252+
-- |
253+
-- | > intercalate [1] [[2, 3], [4, 5], [6, 7]]
254+
-- | = [2, 3, 1, 4, 5, 1, 6, 7]
252255
-- | ```
253256
intercalate :: forall f m. Foldable f => Monoid m => m -> f m -> m
254257
intercalate sep xs = (foldl go { init: true, acc: mempty } xs).acc

0 commit comments

Comments
 (0)