![]() |
|
Navigation |
Synopsis Join a list of values into a string separated by a separator.
Function
str intercalate(str sep, list[value] l)
Usage
import List;
Examples
rascal>import List; ok rascal>intercalate("/", [3]); str: "3" rascal>intercalate("/", [3, 1, 4, 5]); str: "3/1/4/5" rascal>intercalate(", ", [3, 1, 4, 5]); str: "3, 1, 4, 5" rascal>intercalate(", ", ["zebra", "elephant", "snake", "owl"]); str: "zebra, elephant, snake, owl" Questions
Question [1].
![]() ![]() ![]() |