unisonweb / base_v1

Unison base libraries, published using V1 codebase format
24 stars 14 forks source link

Text.concat : Text -> [Text] -> Text #76

Open jdan opened 3 years ago

jdan commented 3 years ago

Needed to concatenate an array of Texts and didn't find anything in the standard library so I thought I'd propose it here.

Inspired by OCaml's String.concat sep sl/

Code review

The changes summarized below are available for you to review, using the following command:

pull-request.load https://github.com/unisonweb/base:.trunk https://github.com/jdan/unisoncode:.prs.base.join

Added definitions:

 Text.concat           : Text -> [Text] -> Text (+1 metadata)
 Text.concat.tests.ex1 : [Result] (+2 metadata)
 Text.concat.tests.ex2 : [Result] (+2 metadata)
 Text.concat.tests.ex3 : [Result] (+2 metadata)