From 18c5eaa21d3be060433705f26661a1a3a165bb57 Mon Sep 17 00:00:00 2001 From: Michael Glass Date: Tue, 21 Aug 2018 16:51:51 -0700 Subject: [PATCH] prefer function composition to repeated map --- src/Nri/Ui/Button/V3.elm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Nri/Ui/Button/V3.elm b/src/Nri/Ui/Button/V3.elm index e132a777..7ae5691b 100644 --- a/src/Nri/Ui/Button/V3.elm +++ b/src/Nri/Ui/Button/V3.elm @@ -538,8 +538,7 @@ renderMarkdown markdown = case Markdown.Block.parse Nothing markdown of -- It seems to be always first wrapped in a `Paragraph` and never directly a `PlainInline` [ Markdown.Block.Paragraph _ inlines ] -> - List.map Markdown.Inline.toHtml inlines - |> List.map Styled.fromUnstyled + List.map (Markdown.Inline.toHtml >> Styled.fromUnstyled) inlines _ -> [ Html.text markdown ]