9 of 16 To align with those guidelines that we got a while back from Meta.

Brainf*** cat - encode a file as a brainf*** program

Challenge

Assume all inputs are encoded as ASCII.

Write a program or function that given a string, returns a valid Brainfuck program that when compiled and executed as Brainfuck, returns that string..

Examples

Space string

Given the input , your program/function should correctly return:

+++++ +++++
+++++ +++++
+++++ +++++
++ .

Exclamation point

Given the input ! , your program/function should correctly return:

+++++ +++++
+++++ +++++
+++++ +++++
+++
.

Two letters

Given the input hi , your program/function should correctly return:

+++++ +++++
+++++ +++++
+++++ +++++
+++++ +++++
+++++ +++++

+++++ +++++
+++++ +++++
+++++ +++++
+++++ +++++
+++++ +++++

++++
.
+
.

This is , so the code with the smallest number of bytes wins. Good luck.