RosettaCodeData/Task/String-interpolation-included-/Transd/string-interpolation-included-.transd
2023-07-01 13:44:08 -04:00

16 lines
376 B
Text

#lang transd
MainModule: {
size: "little",
_start: (λ
// Transd supports direct interpolation
(with s String("Mary had a " size " lamb.")
(lout s))
// To interpolate a string variable within another
// string variable we use 'replace'
(with s "Mary had a %s lamb."
(lout (replace s "%s" size)))
)
}