Commit 4186b410 authored by Sven Tennie's avatar Sven Tennie Committed by Marge Bot

Typeset Big-O complexities with Tex-style notation (#16090)

Use `\min` instead of `min` to typeset it as an operator.
parent ebfa3528
......@@ -241,7 +241,7 @@ infix 5 \\ -- comment to fool cpp: https://downloads.haskell.org/~ghc/latest/doc
dropWhileEnd :: (a -> Bool) -> [a] -> [a]
dropWhileEnd p = foldr (\x xs -> if p x && null xs then [] else x : xs) []
-- | \(\mathcal{O}(min(m,n))\). The 'stripPrefix' function drops the given
-- | \(\mathcal{O}(\min(m,n))\). The 'stripPrefix' function drops the given
-- prefix from a list. It returns 'Nothing' if the list did not start with the
-- prefix given, or 'Just' the list after the prefix, if it does.
--
......@@ -319,7 +319,7 @@ findIndices p ls = build $ \c n ->
in foldr go (\_ -> n) ls 0#
#endif /* USE_REPORT_PRELUDE */
-- | \(\mathcal{O}(min(m,n))\). The 'isPrefixOf' function takes two lists and
-- | \(\mathcal{O}(\min(m,n))\). The 'isPrefixOf' function takes two lists and
-- returns 'True' iff the first list is a prefix of the second.
--
-- >>> "Hello" `isPrefixOf` "Hello World!"
......
......@@ -1013,7 +1013,7 @@ NB: Zips for larger tuples are in the List module.
-}
----------------------------------------------
-- | \(\mathcal{O}(min(m,n))\). 'zip' takes two lists and returns a list of
-- | \(\mathcal{O}(\min(m,n))\). 'zip' takes two lists and returns a list of
-- corresponding pairs.
--
-- > zip [1, 2] ['a', 'b'] = [(1, 'a'), (2, 'b')]
......@@ -1071,7 +1071,7 @@ zip3FB cons = \a b c r -> (a,b,c) `cons` r
-- function given as the first argument, instead of a tupling function.
----------------------------------------------
-- | \(\mathcal{O}(min(m,n))\). 'zipWith' generalises 'zip' by zipping with the
-- | \(\mathcal{O}(\min(m,n))\). 'zipWith' generalises 'zip' by zipping with the
-- function given as the first argument, instead of a tupling function. For
-- example, @'zipWith' (+)@ is applied to two lists to produce the list of
-- corresponding sums:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment