drasil-lang-0.1.60.0: A framework for code and document generation for scientific software - Language SubPackage
Safe HaskellSafe-Inferred
LanguageHaskell2010

Language.Drasil.Misc

Description

A collection of String-handling routines as well as one for making tables.

Synopsis

Documentation

mkTable :: [a -> b] -> [a] -> [[b]] Source #

Create a table body (not including header row) by applying the given functions to the column elements of the table rows (in order). The first argument is a list of functions to be applied (one per column). This essentially creates the rows. The second argument is a list of elements apply the functions to.

For example, mkTable [id, *5] [1,2,3] should produce a table:

| 1 |  5 |
| 2 | 10 |
| 3 | 15 |

repUnd :: String -> String Source #

Replace underscores in a string with periods (.).