Safe Haskell | None |
---|---|

Language | Haskell2010 |

# Documentation

normalized :: Text -> Text Source #

Normalize the input by

- removing non-word characters, except for spaces and commas; and
- converting alphabetic characters to lowercase.

:: Int | Length of the substring |

-> Int | The character offset |

-> Text | The input string |

-> Text | A substring of length |

Return *n* characters starting from offset *m* in the input string.

enclosedIn :: Text -> Char -> Text Source #

Insert a character at the beginning and end of the given string.

norm :: (Integral a, Floating b) => [a] -> b Source #

Returns the euclidean norm, or *magnitude*, of the input list interpreted
as a vector.

That is,

\( \quad \sqrt{ \sum_{i=0}^n a_i^2 } \)

for the input

\( \quad \langle a_0, a_1, \dots, a_n \rangle \)

where \( a_i \) is the element at position *i* in the input list.