Open
Description
It seems to me that these lines in Data.String.CodePoints.uncons
purescript-strings/src/Data/String/CodePoints.purs
Lines 197 to 198 in 157e372
are first slicing the first code unit into a Char
string with the JavaScript charAt
method
and then converting the Char
string to a CodePoint
by the boundedEnumChar
instance fromEnum
method which calls the Javascript charCodeAt
method.
We could skip the intermediate string slice of the charAt
method and call charCodeAt
directly.