In https://github.com/sanctuary-js/sanctuary/pull/686#discussion_r466296798, @Avaq made a strong case for naming this more general function replace. @Avaq also noted that the specialized function, replaceWith, is trivially derivable from replace. For this reason I decided not to include replaceWith in this pull request; it could easily be added in the future if replace (K ('...')) proves irksome.
I have opened sanctuary-js/sanctuary-site#90 to provide several examples of replace in use.
Supersedes #686
This pull request adds the following function:
In https://github.com/sanctuary-js/sanctuary/pull/686#discussion_r466296798, @Avaq made a strong case for naming this more general function
replace
. @Avaq also noted that the specialized function,replaceWith
, is trivially derivable fromreplace
. For this reason I decided not to includereplaceWith
in this pull request; it could easily be added in the future ifreplace (K ('...'))
proves irksome.I have opened sanctuary-js/sanctuary-site#90 to provide several examples of
replace
in use.