Is it a brainfuck instruction? A very simple challenge today. Output a truthy value whether the ASCII character (or it's code) supplied is a brainfuck instruction (one of +-,.&lt;&gt;[]), and a falsy value if it's a comment (everything else).

Input

+
#
&lt;
&gt;
.
P
,


Output

true
false
true
true
true
false
true
brainfuck, 105 103 95 bytes

Outputs \x00 for false and \x01 for true.

,&gt;&gt;&gt;+++++++[&lt;++++++&lt;++++&gt;&gt;-]&lt;+[&lt;&lt;-&gt;&gt;-]&lt;&lt;[-[-[-[--------------[--[&gt;+[&lt;-&gt;-]&lt;[--[&lt;-&gt;[-]]]]]]]]]&lt;+.


Try it online!

The general principle is comparing against all values (decreasing partial distances of the char-codes), using loops to logically OR the results, and if none matched - change the output cell from 1 to 0.

See my 4 answer for a more detailed explanation (4 instructions read more easily).