14
\$\begingroup\$

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

Input

+
#
<
>
.
P
,

Output

true
false
true
true
true
false
true
\$\endgroup\$
8
  • \$\begingroup\$ As in, can the answer be formatted as either a program or function? (such as requiring main(){} and all of that in C answers) \$\endgroup\$ Apr 11, 2020 at 17:57
  • 3
    \$\begingroup\$ @RedwolfPrograms doesn't matterdoesn't matter \$\endgroup\$ Apr 11, 2020 at 18:02
  • 1
    \$\begingroup\$ Is the input character guaranteed to be printable ASCII? (32-126) \$\endgroup\$
    – Arnauld
    Apr 11, 2020 at 18:47
  • 1
    \$\begingroup\$ No, but I'd like to see (a part of an already valid answer) that assumes it's printable as an "addon". As I've stated (or rather deleted the comment afterwards), as it's quite a boring challenge, I'm looking for some creativity \$\endgroup\$ Apr 11, 2020 at 18:50
  • 3
    \$\begingroup\$ @LuisMendo No, according to the esolang wiki, it's often lowercase \$\endgroup\$ Apr 12, 2020 at 15:56

45 Answers 45

21
\$\begingroup\$

brainfuck, 105 103 95 bytes

Outputs \x00 for false and \x01 for true.

,>>>+++++++[<++++++<++++>>-]<+[<<->>-]<<[-[-[-[--------------[--[>+[<->-]<[--[<->[-]]]]]]]]]<+.

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).

\$\endgroup\$
12
\$\begingroup\$

unsure, 1302 bytes

um um yeah err hm yeah uhhhhhhhh then ummmm uhhh errrr uhh errr ummmmm yeah err uh then heh then err um heh but um um yeah err heh no oops then but oops heh oops oops oops oops oops oops oops oops um then heh then uhhhhhhhhh no oops oops then um err uh then heh then err um heh but um um yeah err heh no oops then but oops heh oops oops oops oops oops oops oops um then heh then uhhhhhhhh no oops oops then um err uh then heh then err um heh but um um yeah err heh no oops then but oops heh oops oops oops oops oops oops um then heh then uhhhhhhh no oops oops then um err uh then heh then err um heh but um um yeah err heh no oops then but oops heh oops oops oops oops oops um then heh then uhhhhhh no oops oops then ummmmmmm uh errr uh then heh then err um heh but um um yeah err heh no oops then but oops heh oops oops oops oops um then heh then uhhhhh no oops oops then umm err uh then heh then err um heh but um um yeah err heh no oops then but oops heh oops oops oops um then heh then uhhhh no oops oops then ummmmmm uhhh ummmmm errrrrr uh then heh then err um heh but um um yeah err heh no oops then but oops heh oops oops um then heh then uhhh no oops oops then umm err uh then heh then err um heh but um um yeah err heh no oops then but oops heh oops um then heh then uhh no oops oops oops okay

This was not easy. Unsure is a new stack based language I've created, that uses words people tend to say when they're not sure about something.

It's kind of hard to explain how such a large program works, but I'll try to give a high-level explanation. First, here's an expanded version of this program:

um um yeah err hm yeah uhhhhhhhh then ummmm uhhh errrr uhh errr ummmmm yeah err uh

then heh then err um heh
but um um yeah err heh no oops then
but oops heh oops oops oops oops oops oops oops oops um then heh then uhhhhhhhhh no oops oops then um err uh

then heh then err um heh
but um um yeah err heh no oops then
but oops heh oops oops oops oops oops oops oops um then heh then uhhhhhhhh no oops oops then um err uh

then heh then err um heh
but um um yeah err heh no oops then
but oops heh oops oops oops oops oops oops um then heh then uhhhhhhh no oops oops then um err uh

then heh then err um heh
but um um yeah err heh no oops then
but oops heh oops oops oops oops oops um then heh then uhhhhhh no oops oops then ummmmmmm uh errr uh

then heh then err um heh
but um um yeah err heh no oops then
but oops heh oops oops oops oops um then heh then uhhhhh no oops oops then umm err uh

then heh then err um heh
but um um yeah err heh no oops then
but oops heh oops oops oops um then heh then uhhhh no oops oops then ummmmmm uhhh ummmmm errrrrr uh

then heh then err um heh
but um um yeah err heh no oops then
but oops heh oops oops um then heh then uhhh no oops oops then umm err uh

then heh then err um heh
but um um yeah err heh no oops then
but oops heh oops um then heh then uhh no oops oops

oops okay

The first part sets up the stacks. There are two stacks, one of which is selected as the active stack. The first stack contains a 0 at the bottom (the return value), as well as 8 copies of the input character's ASCII character code, negated.

After this, there are 8 sections to check for equality (first one shown as an example):

then heh then err um heh
but um um yeah err heh no oops then
but oops heh oops oops oops oops oops oops oops oops um then heh then uhhhhhhhhh no oops oops then um err uh

The first line will pop the first stack and add it to the first, which in this case is 43 (the character code for +). It also pushes 1 to the first stack. The next line is essentially an if statement, which is used to create a NOT operator by pushing 0 to the first stack if the result of adding the character code is not 0 (meaning they are not the same).

The third line is the most complicated. It starts with a sort of else statement, as it only runs when the second line's if statement doesn't push 0 (and therefore the character code was 43). It will then replace the bottom of the first stack with 1, the new output.

Finally, after the "else statement", the character code is incremented to 44, for ,, and the process is repeated 7 times.

The last line, oops okay, just outputs the bottom item in the first stack, as the previous operations have cleared it out except for one copy of the input (oops discards the top of the stack, and okay outputs).

There's definitely a few bytes I could golf here and there, might work on it later.

\$\endgroup\$
3
  • 12
    \$\begingroup\$ um err uh okay uh well then um uh yeah um sure \$\endgroup\$
    – S.S. Anne
    Apr 23, 2020 at 20:57
  • 1
    \$\begingroup\$ Why is like not in there? \$\endgroup\$ Jul 13, 2021 at 9:18
  • \$\begingroup\$ @EnderShadow8 Not sure how to answer (luckily this language gives me lots of options to express that :p) \$\endgroup\$ Jul 13, 2021 at 14:06
11
\$\begingroup\$

Retina 0.8.2, 9 bytes

[]+-.<>[]

Try it online! Link includes test cases. Explanation: This is actually a character class; the outer []s delimit the class, as (by being placed immediately after the opening [) the first ] is actually part of the class. The , isn't needed as the - creates a range from + to . which helpfully includes the - itself as well as the ,.

\$\endgroup\$
1
  • \$\begingroup\$ I am now worried that the stuff that parses regular expressions is actually a backtracking regex engine... \$\endgroup\$ Apr 12, 2020 at 3:37
10
\$\begingroup\$

Python, 16 bytes

'+-,.<>[]'.count

Try it online!

An anonymous method is shorter here than a lambda. See my tip Object method as answer.

\$\endgroup\$
4
  • 1
    \$\begingroup\$ <built-in method count of str object at 0x101520730>? \$\endgroup\$ Apr 12, 2020 at 15:32
  • \$\begingroup\$ The str object "at 0x101520730" is the string literal in the program. It has a built-in method named count. This method will return 1 only if given an instruction character. You can call it in the normal way by providing an immediate parameter e.g. ('.') or you can assign it to a variable (e.g. f) and call f later. \$\endgroup\$
    – Neil
    Apr 13, 2020 at 13:53
  • \$\begingroup\$ @VictorVosMottorthanksMonica Note also that the usual submissions of lamdba's are represented as a similarly weird value like <function <lambda> at 0x7fd4f39d7758>. \$\endgroup\$
    – xnor
    Apr 13, 2020 at 21:37
  • 1
    \$\begingroup\$ Anything that doesn't have a __str__ or a __repr__ has that. \$\endgroup\$
    – PkmnQ
    Apr 14, 2020 at 2:04
7
\$\begingroup\$

vJASS (Warcraft 3), 299 278 265 bytes

Using //! import zinc "<code_path>" command to exclude //! zinc and //! endzinc.


Prints T (True) and F (False).

library Q{trigger W=CreateTrigger();integer E;function onInit(){TriggerRegisterPlayerChatEvent(W,Player(0),"",false);TriggerAddAction(W,function(){for(0<=E<8){if(GetEventPlayerChatString()==SubString("+-<>.,[]",E,E+1)){BJDebugMsg("T");return;}}BJDebugMsg("F");});}}

Readable Version:

library CodeGolf{
    trigger chatEvent = CreateTrigger();
    integer Index;

    function onInit(){
        TriggerRegisterPlayerChatEvent(chatEvent, Player(0), "", false);
        TriggerAddAction(chatEvent, function(){
            for (0 <= Index < 8){
                if(GetEventPlayerChatString() == SubString("+-<>.,[]", Index, Index + 1)) {
                    BJDebugMsg("T");
                    return;
                }
            }
            BJDebugMsg("F");
        });
    }
}

Output:

enter image description here

\$\endgroup\$
0
5
\$\begingroup\$

05AB1E, 11 bytes

+1 due to a bug fix noted by @Kevin Cruijssen

-1 thanks to @Kevin Cruijssen

"+-,.<["ºIå

Try it online!

an interesting approach, but sadly it's longer and it doesn't work:

•q”;ιÚ•2ôIÇ;îå

Try it online!

\$\endgroup\$
1
  • 1
    \$\begingroup\$ Your 11-byter should be "+-,.<>[]"Iå or "+-,.<>[]"så. You want to check if the input is in that string, not if that string is in the input. And you can save a byte by using the mirror builtin: "+-,.<["ºIå \$\endgroup\$ Apr 14, 2020 at 7:59
4
\$\begingroup\$

Haskell, 18 bytes

(`elem`"+-.,<>[]")

Try it online!

Low-effort unnamed function.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ For convenience with pointfree TIO submissions, you can add the -cpp flag and use backslash to continue a line like this: Try it online! \$\endgroup\$
    – xnor
    Apr 13, 2020 at 21:39
  • \$\begingroup\$ @xnor ah I tried to do that without the flag, ty \$\endgroup\$
    – clapp
    Apr 13, 2020 at 23:30
3
\$\begingroup\$

4, 131 bytes

Outputs \x00 for false, \x01 for true.

3.799600006010160202614146292964343199994389919999018991999901899199990189919999148991999902899199992989919999028995004999999995014

Try it online!

Explanation

4 doesn't have a simple comparison or condition instructions, so I used while-not-zero loops to fake them and match by distances:

3.

6 00 00            # set constants
6 01 01 
6 02 02 
6 14 14 
6 29 29 
6 43 43 

7 99               # input as integer

1 99 99 43 - 8 99  # for each brainfuck character
1 99 99 01 - 8 99  # compare to the input,
1 99 99 01 - 8 99  #  (subtracting differences to the input)
1 99 99 01 - 8 99  #  and jump to the end if true,
1 99 99 14 - 8 99  #  otherwise start a loop (to fake branching)
1 99 99 02 - 8 99 
1 99 99 29 - 8 99 
1 99 99 02 - 8 99 
5 00 4             # if all comparisons failed, print 'false' and exit
9 9 9 9 9 9 9 9    # close loops

5 01 4             # print 'true' and exit
\$\endgroup\$
3
\$\begingroup\$

C (gcc), 28 bytes

f(c){c=index("+-,.<>[]",c);}

No math here, no math there, no math anywhere.

Try it online!

\$\endgroup\$
3
\$\begingroup\$

Pyke, 3 bytes

Built-ins FTW!

~B{

Try it online!

Explanation

~B  "><+-.,[]"
  { Does it contain input?
\$\endgroup\$
3
\$\begingroup\$

Python 3, 26, 23 bytes

lambda s:s in'+-,.<>[]'

Try it online!

\$\endgroup\$
5
  • 1
    \$\begingroup\$ Is this really a valid format? \$\endgroup\$ Apr 12, 2020 at 6:55
  • \$\begingroup\$ @dingledooper , I might have gotten mixed up. I'm pretty new, still don't know all the valid formats. The only reason I changed this from my old answer was because I saw xnor's answer, which I thought was invalid, but, hey - he's way more experienced than me, so I probably just didn't know something. Am changing back to my old one. \$\endgroup\$
    – Dion
    Apr 12, 2020 at 6:59
  • 2
    \$\begingroup\$ For your information, xnor's answer is still a function, in that it can be called with a parameter. Your previous answer was not, it was just a snippet since in is a keyword that doesn't make a function \$\endgroup\$
    – Jo King
    Apr 12, 2020 at 12:32
  • \$\begingroup\$ @Dion See also my tip Object method as answer. \$\endgroup\$
    – xnor
    Apr 13, 2020 at 21:59
  • 2
    \$\begingroup\$ This isn't a valid answer; it's an expression, not a function. \$\endgroup\$
    – FlipTack
    May 30, 2020 at 15:38
3
\$\begingroup\$

Fig, \$10\log_{256}(96)\approx\$ 8.231 bytes

Ix"[]-=.,"

Try it online!

An answer so the bot can get 30 rep to chat. Never mind, realized I had enough on SF&F, but deleting this would be useless, so here ya go.

\$\endgroup\$
3
\$\begingroup\$

6502 assembly, 17 bytes

0000: 69 05 29 FD A2 04 D5 0C
0008: F0 03 CA D0 F9 60 30 31
0010: 41

This subroutine should be called with A set to the input, and the carry flag cleared. It will return with the Z flag indicating whether the input was a Brainfuck instruction.

Here the subroutine is at $0000 but it can go anywhere on the zero page. The asterisk in cmp *r-1,x forces a 2-byte zero-page-based comparison (in this web assembler, at least).

.org $0000
f:
  adc #5
  and #$fd
  ldx #4
loop:
  cmp *r-1,x
  beq r
  dex
  bne loop
r:
  rts  ; which is #$60
.byte $30, $31, $41

How it works

The valid Brainfuck instructions are {2b, 2c, 2d, 2e, 3c, 3e, 5b, 5d} in hexadecimal. Adding 5 to the ASCII values groups them into pairs like "n or n+2" where the second-lowest bit doesn't matter:

Instruction ord+5 Bit pattern
+ or - $30 or $32 0011 00x0
, or . $31 or $33 0011 00x1
< or > $41 or $43 0100 00x1
[ or ] $60 or $62 0110 00x0

This means we can check if (n+5)&~2 ∈ {$30, $31, $41, $60}.

Actually a lot of choices other than 5 work. But this one puts $60 in the set of values to look for, which is the opcode for the RTS instruction. Thus we can interleave the table with the final instruction and save one byte.

\$\endgroup\$
2
\$\begingroup\$

Keg, -rt, 10 bytes

-`[]+-,.<>

This:

  • Pushes the string []+-,.<> onto the stack
  • Subtracts that string from the input.

If it is a BF instruction, an empty string will be printed, otherwise, the input character will be printed.

\$\endgroup\$
2
\$\begingroup\$

Python 3, 26 bytes

print(input()in"+-,.<>[]")
\$\endgroup\$
2
  • \$\begingroup\$ You need something to output the result, usually print. See the Python I/O summary. \$\endgroup\$
    – xnor
    Apr 13, 2020 at 21:40
  • \$\begingroup\$ I'm pretty sure you can use exit instead of print. \$\endgroup\$
    – PkmnQ
    Apr 24, 2020 at 6:14
2
\$\begingroup\$

Desmos, 43 bytes

1\left\{42<i<47,i=60,i=62,i=91,i=93\right\}

Try it online

Desmos doesn't support strings, so this turns from relatively trivial string comparison to relatively trivial integer comparison. I tried to compress the higher numbers, but I couldn't find a nice way to exclude 61 and 92, and the sequence doesn't show up in OEIS.

\$\endgroup\$
2
  • \$\begingroup\$ Where exactly can we test desmos answers at? Please do provide a link in later submissions. \$\endgroup\$
    – Razetime
    Aug 24, 2020 at 2:21
  • 1
    \$\begingroup\$ @Razetime You can test Desmos answers at the link provided at Desmos (note: I accidentally put the wrong one for this question, fixing that as well). I didn't bother to generate a specific link for this answer as it's trivial, but I probably should have. Adding it now. \$\endgroup\$ Aug 24, 2020 at 3:49
2
\$\begingroup\$

Japt , 63 bits / 7.875 bytes

o"+,-.<>[]

Try it

(Because, apparently, we're scoring in bits now? 🤷🏼‍♂️)

\$\endgroup\$
1
2
\$\begingroup\$

6502 Machine-Language, 32 bytes

0000: AD 1E 00 A2 00 DD 15 00
0008: D0 04 EE 1F 00 00 E8 EC
0010: 1D 00 D0 F1 00 3C 3E 2B
0018: 2D 2E 2C 5B 5D 08 50 00

The above "ROM" includes the variables and the program. Here's a basic breakdown:

0000: AD 1D 00 A2 00 DD 14 00    Program
0008: D0 04 EE 1E 00 00 E8 EC
0010: 1C 00 D0 F1 00
                     3C 3E 2B    Brainfuck instructions
0018: 2D 2E 2C 5B 5D 08          ("<>+-.,[]" and an 8 for the length)
                        50 00    Input char and output byte

You can try it out using This online emulator by copying the above ROM into the "RAM" field and setting the input byte (0x001D) to the desired character in hexadecimal. Then you can load it into memory by pressing "Load Memory", then press "Show Memory" to confirm it loaded and check the box "live update" so it will show the result once it's done. Finally, you can press "Continuous Run" and it will write the result to the last byte of the ROM (0x001E). 0x01 for true and 0x00 for false.

Assembly Code:

.ORG $0000

; PROGRAM

  LDA INPUT
  LDX #0
loop:
  CMP CHARS,X
  BNE end
  INC OUTPUT
  BRK
end:
  INX
  CPX CHARSLEN
  BNE loop
  BRK

; DATA

CHARS:
  .ASCII "<>+-.,[]"
CHARSLEN:
  .BYTE 8
INPUT:
  .ASCII "P"
OUTPUT:
  .BYTE 0

To summarise, it basically reads the input character into the accumulator and then loops over the list of Brainfuck instructions using the X register and if Acc matches any of the chars it increments the output byte and exits.

It's probably not very good and could also probably be smaller, but I'm not very experienced with 6502 assembly and just wanted to give it a go. Feedback welcome :)

(I also haven't tested it very thoroughly so it might also not work in some cases)

\$\endgroup\$
2
\$\begingroup\$

Thunno 2, 4 bytes

kŻ$Ƈ

11 bytes:

"[]<>-+.,"$Ƈ

14 bytes:

»ÐṘWĠœṪɲ»ɦBCsƇ

16 bytes:

C¿€ỵæ-j2oẹ&⁵ẏ¿sƇ

Due to a bug with the Ƈ command (which will be fixed in 2.2.0), the s is needed in the last two answers. They will both be one byte less in 2.2.0.

Explanations

kŻ$Ƈ  # Implicit input
  $   # The input...
   Ƈ  # ...is in...
kŻ    # ...the string "[]<>-+.,"
      # Implicit output
"[]<>-+.,"$Ƈ  # Implicit input
          $   # The input...
           Ƈ  # ...is in...
"[]<>-+.,"    # ...the string "[]<>-+.,"
              # Implicit output
»ÐṘWĠœṪɲ»ɦBCsƇ  # Implicit input
»ÐṘWĠœṪɲ»       # Compressed integer 4344454660629193...
         ɦB     # ...converted to base 100 as a list...
           C    # ...and converted to ordinals...
            sƇ  # ...contains the input
                # Implicit output
C¿€ỵæ-j2oẹ&⁵ẏ¿sƇ  # Implicit input
C                 # The ordinal of the input...
              sƇ  # ...is in...
 ¿€ỵæ-j2oẹ&⁵ẏ¿    # ...the compressed list [43, 44, 45, 46, 60, 62, 91, 93]
                  # Implicit output

Screenshots

Screenshot 1 Screenshot 2

\$\endgroup\$
2
  • 1
    \$\begingroup\$ ... why is a built-in?! \$\endgroup\$
    – Shaggy
    May 10 at 23:37
  • 1
    \$\begingroup\$ @Shaggy Vyxal has kT for the same thing as well. I didn't know what else to add as a constant, and I had one space left, so I added it :p \$\endgroup\$
    – The Thonnu
    May 11 at 6:24
1
\$\begingroup\$

SNOBOL4 (CSNOBOL4), 45 bytes

 "<>[]+-,." INPUT :F(F)
 X =1
F OUTPUT =X
END

Try it online!

1 for truthy, empty line for falsey.

\$\endgroup\$
1
\$\begingroup\$

JavaScript (Node.js), 25 23 bytes

-2 thanks to @Arnauld

c=>/[+-.<>[\]]/.test(c)

Try it online!

\$\endgroup\$
5
  • \$\begingroup\$ 23 bytes \$\endgroup\$
    – Arnauld
    Apr 11, 2020 at 20:01
  • \$\begingroup\$ @Arnauld Forgot about .test, thanks! \$\endgroup\$ Apr 11, 2020 at 20:16
  • \$\begingroup\$ You can just use /[+-.<>[\]]/.test - point-free \$\endgroup\$
    – pxeger
    Aug 24, 2020 at 7:59
  • 1
    \$\begingroup\$ @pxeger Doesn't work. Try f=/[+-.<>[\]]/.test then f("[") \$\endgroup\$ Aug 24, 2020 at 13:14
  • \$\begingroup\$ @RedwolfPrograms wow I should never under-estimate the stupidity of JavaScript \$\endgroup\$
    – pxeger
    Aug 24, 2020 at 15:29
1
\$\begingroup\$

Pyth, 10 bytes

/"+-,.<>[]

Try it online!

\$\endgroup\$
1
\$\begingroup\$

Kotlin, 18 bytes

{it in "+-<>[].,"}

Try it online!

\$\endgroup\$
1
\$\begingroup\$

Arn, 9 bytes

[‚‚◄┴´£Q7

Try it!

Explained

Unpacked: "+-.,<>[]"&

  "+-.,<>[]" Literal string
& Contains element
  _ Variable initialized to STDIN; implied
\$\endgroup\$
1
\$\begingroup\$

Scala 2.12, 15 bytes

"<>+-.,[]"toSet

This takes the string of all brainf*** instructions and turns it into a set. Since Scala's sets are also predicates, we can treat it like a function that returns true when it's a valid instruction.

Scala 2.12 is required for postfix operator toSet.

Try it online

\$\endgroup\$
1
\$\begingroup\$

Jelly, 10 bytes

ẇ“+-<>[],.

Try it online!

How it works

ẇ“+-<>[],. - Main link. Takes a character C on the left
 “+-<>[],. - Yield "+-<>[],."
ẇ          - Is C in that string?
\$\endgroup\$
1
\$\begingroup\$

Red, 27 bytes

""= exclude input"+-,.<>[]"
\$\endgroup\$
1
  • 1
    \$\begingroup\$ Welcome to the site, and nice first answer! Would you mind editing in a link to an online interpreter such as TryitOnline, so that other's can test and verify your code? \$\endgroup\$ Nov 2, 2020 at 0:37
1
\$\begingroup\$

Vyxal r, 11 bytes

`[]+-.<>,`c

Try it Online!

More interestingly,

Vyxal r, 13 bytes

C₁»½¤Ǎ⋏⟨꘍ċ»τc

Try it Online!

C             # Get charcode
 ₁»½¤Ǎ⋏⟨꘍ċ»τ  # Base-100 list of valid charcodes
            c # Is included?
\$\endgroup\$
1
  • \$\begingroup\$ kTc \$\endgroup\$
    – emirps
    May 11 at 13:37
1
\$\begingroup\$

Julia 1.0, 14 bytes

in("+-,.<>[]")

Try it online!

some Julia functions will return an anonymous function when fed with not enough arguments, basically in(x) = y -> in(y,x). It would be a bit more interesting with but it costs 1 more byte.

\$\endgroup\$
1
\$\begingroup\$

Pxem (pxem.mktemp.emb.posixism, BREAK_LOOP_WHEN_INSUFFICIENT=1), filename only: 33 bytes.

The \0001 is an unprintable whose codepoint is 0x01.

[<>+-,.][email protected]\0001.yT.o.d.a.c.a

Try it online!

Accepts one character from stdin as an input. Outputs a T for truthy, nothing for falsey.


Pxem (pxem.mktemp.emb.posixism, BREAK_LOOP_WHEN_INSUFFICIENT=0), filename only: 42 bytes.

The \0001 is an unprintable whose codepoint is 0x01.

[<>+-,.][email protected]\[email protected]

Try it online!

Accepts one character from stdin as an input. Outputs a T for truthy, nothing for falsey.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.