A language with string manipulation facilities uses the following operations.
head$(s)$- returns the first character of the string $s$
tails$(s)$- returns all but the first character of the string $s$
concat$(s1, s2)$- concatenates string $s1$ with $s2.$
The output of concat(head$(s)$, head(tail(tail$(s)$))), where s is $acbc$ is:
- ab
- ba
- ac
- aa