We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3f7ad6f commit c04a774Copy full SHA for c04a774
src/Data/String.purs
@@ -36,6 +36,7 @@ module Data.String
36
import Prelude
37
38
import Data.Maybe (Maybe(..), isJust)
39
+import Data.Monoid (mempty)
40
import Data.String.Unsafe as U
41
42
-- | Returns the character at the given index, if the index is within bounds.
@@ -72,7 +73,7 @@ foreign import _toChar :: (forall a. a -> Maybe a)
72
73
74
-- | Returns `true` if the given string is empty.
75
null :: String -> Boolean
-null s = length s == zero
76
+null = eq mempty
77
78
-- | Returns the first character and the rest of the string,
79
-- | if the string is not empty.
0 commit comments