
7 Jan
2019
7 Jan
'19
7:43 p.m.
A quick and dirty answer might be: fmap (Data.Text.intercalate ".") resBDwords I'd probably write it: Data.Text.intercalate "." <$> resBDwords but you'd probably want to check your input has exactly two elements. You could use pattern matching: f (Just [a, b]) = Just $ a <> "." <> b f _ = Nothing Then (f resBDwords) gives you what you want I think and avoids head and tail.