Strict evaluation variant of Monoid.append
.
Strict evaluation variant of Monoid.append
that associates to the right,
therefore building more optimal data structures.
Evaluates and stores the String represented by this, returning an equivalent Cord.
Explicitly construct the output String represented by this Cord
LEGACY: scalaz <= 7.2 users expect toString to return the underlying String
LEGACY: scalaz <= 7.2 users expect toString to return the underlying String
A
Cord
is a purely functional data structure for efficiently creating aString
from smaller parts, useful for printing ADTs that must write out their contents into a text format.A
z
interpolator is available for buildingString
from literals, using theShow
typeclass to populate each "hole", and acord
interpolator for buildingCord
instances.If a more efficient solution is required to write a large
String
to a network socket or file, consider https://github.com/scalaz/scalaz/issues/1797If you require a general text manipulation data structure, consider using
FingerTree
or creating a custom structure to resemble that used by the popular text editors:- https://ecc-comp.blogspot.co.uk/2015/05/a-brief-glance-at-how-5-text-editors.html - https://pavelfatin.com/typing-with-pleasure/