diff options
author | Joseph C. Sible <josephcsible@users.noreply.github.com> | 2020-02-07 02:38:25 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-07 08:38:24 +0100 |
commit | a5a3ac994618d71ecaf2e8bd40251d792edc9c22 (patch) | |
tree | b274d0502eacd468d0cd733b7be505aebad381cf /data/templates/default.icml | |
parent | 013a1647a7c78e92b12c2ae520699ef7a567029a (diff) | |
download | pandoc-a5a3ac994618d71ecaf2e8bd40251d792edc9c22.tar.gz |
Various minor cleanups and refactoring (#6117)
* Use concatMap instead of reimplementing it
* Replace an unnecessary multi-way if with a regular if
* Use sortOn instead of sortBy and comparing
* Use guards instead of lots of indents for if and else
* Remove redundant do blocks
* Extract common functions from both branches of maybe
Whenever both the Nothing and the Just branch of maybe do the same
function, do that function on the result of maybe instead.
* Use fmap instead of reimplementing it from maybe
* Use negative forms instead of negating the positive forms
* Use mapMaybe instead of mapping and then using catMaybes
* Use zipWith instead of mapping over the result of zip
* Use unwords instead of reimplementing it
* Use <$ instead of <$> and const
* Replace case of Bool with if and else
* Use find instead of listToMaybe and filter
* Use zipWithM instead of mapM and zip
* Inline lambda wrappers into the real functions
* We get zipWithM from Text.Pandoc.Writers.Shared
* Use maybe instead of fromMaybe and fmap
I'm not sure how this one slipped past me.
* Increase a bit of indentation
Diffstat (limited to 'data/templates/default.icml')
0 files changed, 0 insertions, 0 deletions