Write a cat program, a quine, and a Hello World in the same language such that when two specific programs of the three are concatenated in a certain order, you get the third program. It does not matter which program is the first, second, and third are as long as all three types are represented once each.
e.g. if \$A\$ is a cat and \$B\$ is a quine then \$AB\$ is Hello World. Alternatively, if \$A\$ is Hello World and \$B\$ is a cat then \$AB\$ is a quine. You only need to make one permutation of the possible 6 work.
For completeness of explanation:
- A cat program outputs the input exactly
- A quine is a program that outputs its own source code
- A hello world program outputs the string "Hello World!"
Rules, Scoring, Formatting
- Shortest code wins. Scoring goes by the length of the concatenated program, i.e. the longest of the three.
- Standard rules and loopholes apply.
- The hello world program and quine might possibly receive input. You must output the appropriate text regardless of what is given as input.
- Programs may output a trailing newline.
- You can treat all three programs as if they are surrounded by your language's function closure (please specify the name of your implicit argument in this case) or
mainfunction boilerplate if that is required for your solution to work. Use the same convention for all three programs. The quine should not contain the boilerplate in this case.
Format the header of your answer like this:
<first type> + <second type> = <third type>, <language>, <score>
<language>, <first type> + <second type> = <third type>, <score>