[Question]
  [
> 
> There have been a couple of [previous](https://codegolf.stackexchange.com/q/1798/62131) [attempts](https://codegolf.stackexchange.com/q/19594/62131) to ask this question, but neither conforms to modern standards on this site. Per [discussion on Meta](http://meta.codegolf.stackexchange.com/a/11600/62131), I'm reposting it in a way that allows for fair competition under our modern rulesets.
> 
> 
> 
## Background
A [palindrome](/questions/tagged/palindrome "show questions tagged 'palindrome'") is a string that "reads the same forwards and backwards", i.e. the reverse of the string is the same as the string itself. We're not talking about "convenient palindromes" here, but a strict character-by-character reversal; for example, `()()` is not a palindrome, but `())(` is.
## The task
Write a program or function that takes a string *S* (or the appropriate equivalent in your language) as input, and has one output *Q* (of a type of your choice). You can use [any reasonable means](http://meta.codegolf.stackexchange.com/questions/2447/default-for-code-golf-input-output-methods?noredirect=1&lq=1) to take the input and provide the output.
* When the input *S* is a palindrome, the output *Q* should have a value *A* (that is the same for any palindromic *S*).
* When the input *S* is not a palindrome, the output *Q* should have a value *B* (that is the same for any non-palindromic *S*).
* *A* and *B* must be distinct from each other.
Or in other words: map all palindromes to one value, and all non-palindromes to another.
Additionally, the program or function you write must be a palindrome itself (i.e. its source code must be palindromic), making this a [restricted-source](/questions/tagged/restricted-source "show questions tagged 'restricted-source'") challenge.
## Clarifications
* Although `true` and `false` are obvious choices for *A* and *B*, you can use any two distinct values for your "is a palindrome" and "isn't a palindrome" outputs, which need not be booleans.
* We're defining string reversal at the *character* level here; `éé` is palindromic regardless of whether the program is encoded in UTF-8 or Latin-1, even though it's not a palindromic sequence of octets after UTF-8 encoding.
* However, even if your program contains non-ASCII characters, it only needs to work for ASCII input. Specifically, the input *S* will only contain printable ASCII characters (including space, but not including newline). Among other things, this means that if you treat the input as a sequence of bytes rather than a sequence of characters, your program will still likely comply with the specification (unless your language's I/O encoding is *very* weird). As such, the definition of a palindrome in the previous bullet only really matters when checking that the program has a correct form.
* Hiding half the program in a comment or string literal, while being uncreative, is legal; you're being scored on length, not creativity, so feel free to use "boring" methods to ensure your program is a palindrome. Of course, because you're being scored on length, parts of your program that don't do anything are going to worsen your score, so being able to use both halves of your program is likely going to be helpful if you can manage it.
* Because the victory criterion is measured in bytes, you'll need to specify the encoding in which your program is written to be able to score it (although in many cases it will be obvious which encoding you're using).
## Victory criterion
Even though the program needs to be a palindrome at the character level, we're using bytes to see who wins. Specifically, the shorter your program is, measured in bytes, the better; this is a [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'") challenge. In order to allow submissions (especially submissions in the same language) to be compared, place a byte count for your program in the header of your submission (plus a character count, if it differs from the number of bytes).
  
[Answer]
# [Brachylog](https://github.com/JCumin/Brachylog) (2), 3 bytes in Brachylog's codepage
```
I↔I
```
[Try it online!](https://tio.run/nexus/brachylog2#@@/5qG2K5///SkWJyanJiUVKAA "Brachylog – TIO Nexus")
This is a full program that takes input via standard input (using Brachylog's syntax for constants, i.e. strings are enclosed in double quotes), and outputs via standard output. The outputs are `true.` for a palindromic input, and `false.` for a non-palindromic input.
Not only is this program palindromic, it also has left/right (and probably in some fonts up/down) mirror symmetry.
## Explanation
In Brachylog, capital letters mark points in the program which have identical values; this is used almost like an electrical circuit to carry information from one part of the program to another. One consequence of this is that if you enclose a command between an identical pair of capital letters, you're effectively asserting that the command's input and output are the same. Brachylog implicitly takes input, so in this case we're also asserting that the input to the command is the same as the input to the program. In this program, we're using the command `↔`, which reverses things (in this case, strings); so the program effectively asserts that the input is the same forwards and backwards.
A full program (as opposed to a function) in Brachylog returns a boolean, `false.` if there's no way to make all the assertions in the program correct at once, or `true.` if the assertions in the program are all compatible with each other. We only have one assertion here – that reversing the input does not change it – so the program acts as a palindrome checker.
[Answer]
# [Pyth](https://github.com/isaacg1/pyth), 3 bytes
```
_I_
```
Returns *True* or *False*.
[Try it online!](https://tio.run/nexus/pyth#@x/vGf//v3piUnJSojoA "Pyth – TIO Nexus")
### How it works
```
  _  Reverse the input.
_I   Invariant-reverse; test if the reversed input is equal to its reverse.
```
[Answer]
# [Python](https://docs.python.org), 39 bytes
```
lambda s:s[::-1]==s#s==]1-::[s:s adbmal
```
[Try it online!](https://tio.run/nexus/python3#JYzBCsQgEEPPu18xsAcV2kOvA/MlrgVLFQqtFkeEfr219ZDkEUI8/etuj2W1wMgacZwMEf@YyEwjom4t2HU57F59TJAdZ9gCaCEGIR@9prq/MV@O3TU3CrGUFiWU2EdKGPx@zrSFLJM7k3zu1AC@g6r1Bg "Python 3 – TIO Nexus")
Boring, but if there is shorter in Python it will be impressive.
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 5 bytes
```
ḂŒ
ŒḂ
```
Returns **1** or **0**. The first line is an unexecuted helper link, the second line calls the palindrome test.
[Try it online!](https://tio.run/nexus/jelly#@/9wR9PRSVxHJwHp////qycmJSclqgMA "Jelly – TIO Nexus")
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 5 bytes
```
⁼ṚaṚ⁼
```
[Try it online!](https://tio.run/nexus/jelly#@/@occ/DnbMSgRjI@n@4/VHTmv//o9XVddQ1QBhMaEJIMGVTmVqcWmkDZOXl29kBKbs8u3yIIk31WAA "Jelly – TIO Nexus")
Equals reverse and reverse equals.
Or the more efficient yet less aesthetically pleasing:
```
⁼Ṛ
Ṛ⁼
```
or
```
Ṛ⁼
⁼Ṛ
```
[Answer]
# Haskell, ~~87~~ ~~85~~ ~~44~~ 34 bytes
```
p=(==)<*>reverse--esrever>*<)==(=p
```
Explanation: `((->) a)` is an instance of Applicative (thanks @faubiguy), with `<*>` defined as
```
(<*>) f g x = f x (g x)
```
So by substituting in the arguments one can see why this works.
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), 3 bytes
Code:
```
ÂQÂ
```
Explanation:
```
Â     # Bifurcate (duplicate and reverse the duplicate) implicit input
 Q    # Check if equal
  Â   # Bifurcate the result
```
Uses the **CP-1252** encoding. [Try it online!](https://tio.run/nexus/05ab1e#@3@4KfBw0///RYnJqcmJRQA "05AB1E – TIO Nexus")
[Answer]
## Mathematica, 23 bytes
```
QemordnilaP;PalindromeQ
```
Not very interesting, but for the sake of completeness...
The above is a `CompoundExpression` which evaluates to `PalindromeQ`, a built-in that solves the challenge. `QemordnilaP` is simply an undefined identifier, which is ignored because of the `;`.
[Answer]
# [PHP](https://php.net/), 55 bytes
```
<?=strrev($s=$argv[1])==$s;#;s$==)]s[TEG_$=s$(verrts=?<
```
[Try it online!](https://tio.run/##K8go@P/fxt62uKSoKLVMQ6XYViWxKL0s2jBW09ZWpdha2bpYxdZWM7Y4OsTVPV7FtlhFoyy1qKik2Nbe5v///@X55QA "PHP – Try It Online")
[Answer]
# [MATL](https://github.com/lmendo/MATL), 7 bytes
```
tPX=XPt
```
[Try it online!](https://tio.run/nexus/matl#@18SEGEbEVDy/7@6RlFicmpyYpGGOgA "MATL – TIO Nexus")
Returns [1; 1] for palindromic input and [0; 0] otherwise. 
```
t       % duplicate the input
P       % reverse the second string
X=      % check the two strings are exactly equal (returns 0 or 1)
XP      % flip array (does nothing)
t       % duplicate the answer, giving either [1;1] or [0;0]
        % (implicit) convert to string and display
```
[Answer]
# [Pip](https://github.com/dloscutoff/pip), ~~12~~ 11 bytes
Now comment-free!
```
x:RVaQaVR:x
```
Takes input as a command-line argument; outputs `1` for palindrome, `0` for non-palindrome. [Try it online!](https://tio.run/nexus/pip#@19hFRSWGJgYFmRV8f///9zElMTcTDAJAA "Pip – TIO Nexus")
The core of what we want to do is `RVaQa`: `reverse(a) string-equals a`. The code `x:RVaQa` calculates this result and assigns it to `x`. Then `VR:x` assigns the value of `x` to the variable `VR`. Since this assignment is the last statement in the program, its value is also autoprinted. Voila!
For a previous interesting version using some undefined behavior, see the revision history.
[Answer]
# [Perl 6](https://perl6.org), 25 bytes/chars utf8
```
{.flip eq$_}#}_$qe pilf.{
```
[Try it](https://tio.run/nexus/perl6#FcvBDcIgGAbQO1N8iSglqdz0YjoLIfQnktBCSzVpSAfqHJ3JM@q7v1cmvO/KPtiw4mJjT@hqUS74BJq43k6b5hMh@eBUqS7OCH6k3EgUBmSz4p8arqVyw9KI8y0L2UJAtFCJ5sC2euzHzsa4wCCZX@/nONBnjFdr7JO@ "Perl 6 – TIO Nexus")
[Answer]
## [GNU sed](https://en.wikipedia.org/wiki/Sed), ~~64~~ 59 + 1(r flag) = 60 bytes UTF-8
Took me a while to come up with a sed answer that is not using a comment section to make the code a palindrome. Instead, I use the `c` command that would print the first half of the code in reverse order, only I make sure this instruction is not reached.
```
:;s:^(.)(.*)\1$:\2:;t;/../c1
d
1c/../;t;:2\:$1\)*.().(^:s;:
```
The script prints **`1`** if the input string is not a palindrome (think of it as giving an error). If the string is a palindrome, then **no output** is given (think of it as exiting successfully).
**Run examples:** or [**Try it online!**](https://tio.run/nexus/bash#FcgxCsAgDAXQ3VM4CCaFRuL4cxURikqnLrX3t@32eHN0v98@LthEJWGSjYsGlAx7LImkpq47bT@/QS4IWngTYqGKaVhxncc1Xg)
```
me@LCARS:/PPCG$ sed -rf palindrome_source.sed <<< "level"
me@LCARS:/PPCG$ sed -rf palindrome_source.sed <<< "game"
1
```
**Explanation:**
```
:                              # start loop
s:^(.)(.*)\1$:\2:              # delete first and last char, if they are the same
t                              # repeat if 's' was successful
/../c1                         # if at least 2 chars are left, print 1. 'c' reads
                               #till EOL, so next command must be on a new line.
d                              # delete pattern space. This line must be a
                               #palindrome itself, and must end the script.
1c/../;t;:2\:$1\)*.().(^:s;:   # (skipped) print first half of code in reverse
                               #order. Everything after 'c' is treated as string.
```
[Answer]
## R, ~~111~~ 103 bytes
```
all((s<-el(strsplit(scan(,"",,,"\n"),"")))==rev(s))#))s(ver==)))"",)"n\",,,"",(nacs(tilpsrts(le-<s((lla
```
Not the most original answer. `#` is the comment character in **R**
**Ungolfed:**
```
all((s<-el(strsplit(scan(,"",,,"\n"),"")))==rev(s))
#
))s(ver==)))"",)"n\",,,"",(nacs(tilpsrts(le-<s((lla
```
The character string from `scan` is converted into raw bytes thanks to the `charToRaw` function. These raw bytes are compared one-by-one to their counterparts from the `rev()` function, which reverses the order of its argument. The output of this part is a vector of `TRUE` and/or `FALSE`.  
The `all` function then outputs `TRUE` if all those elements are `TRUE`
Here, `"\n"` in the `scan` function is necessary for inputs with more than one word.
### Previous answer (byte-wise), **81 bytes**
```
function(s)all((s=charToRaw(s))==rev(s))#))s(ver==))s(waRoTr‌​ahc=s((lla)s(noitcnu‌​f
```
with *- 24 bytes* thanks to [@rturnbull](https://codegolf.stackexchange.com/users/59052/rturnbull).
[Answer]
# [RProgN](https://github.com/TehFlaminTaco/Reverse-Programmer-Notation), 11 bytes
```
~]S.E E.S]~
```
The first half of this does all the heavy lifting, and by a convenience of RProgN, the second half is a No-op.
```
~]S.E E.S]~
~           # Treat the word as a Zero Space Segment
 ]          # Duplicate the top of the stack
  S.        # Reverse the top of the stack
    E       # Compare if these values are equal
      E.S]~ # A no-op, because the ~ is at the end of the word, not the start.
```
[Try it online!](https://tio.run/nexus/rprogn#@18XG6znquCqFxxb9////6LE5NTkxCIA "RProgN – TIO Nexus")
[Answer]
## [Alice](https://github.com/m-ender/alice), 19 bytes
```
/@.nzRoi\
\ioRzn.@/
```
[Try it online!](https://tio.run/nexus/alice#@6/voJdXFZSfGcMVk5kfVJWn56D//39RYnJqcmIRAA "Alice – TIO Nexus")
Prints `Jabberwocky` for palindromes and nothing for non-palindromes. Works for arbitrary UTF-8 input.
### Explanation
Since this is a string processing task, Alice will have to operate in Ordinal mode to solve it. That in turn means that the instruction pointer has to move diagonally, and therefore we need at least two lines so that the IP can bounce up and down. The linefeed in such a program makes for a good position to place the middle character of the palindrome. That means the second line needs to be the reverse of the first. But since we're only executing every other character on each line, if we make sure that the line-length is odd, the reverse of the code will neatly fit into its own gaps. The only character that isn't used at all is the backslash, but since it was arbitrary I chose it to make the program look nice and symmetric.
So anyway, the actual relevant code is this:
```
/ . z o
 i R n @
```
Which is executed in a zigzag from left to right.
```
/   Reflect the IP southeast, enter Ordinal mode.
i   Read all input as a single string.
.   Duplicate the input.
R   Reverse the copy.
z   Pop the reverse Y and the original X. If X contains Y, drop everything
    up to its first occurrence. Since we know that X and Y are the same length,
    Y can only be contained in X if X=Y, which means that X is a palindrome.
    So this will result in an empty string for palindromes and in the non-empty
    input for non-palindromes.
n   Logical NOT. Replaces non-empty strings with "", and empty strings with
    "Jabberwocky", the "default" truthy string.
o   Output the result.
@   Terminate the program.
```
[Answer]
## [Retina](https://github.com/m-ender/retina), 53 bytes
Byte count assumes ISO 8859-1 encoding.
```
$
¶$`
O$^`\G.
»
D`
M$`^.+$
$+.^`$M
`D
»
.G\`^$O
`$¶
$
```
[Try it online!](https://tio.run/nexus/retina#Fcm7CQAhEATQfOqYTNgqBCOxAVnGz7VocpmN7XEvfUHcQ6HR1YvhvshCpdwSwWQuVij/YaXL2SDeA0aMufaz1xwf "Retina – TIO Nexus")
I'm pretty sure this isn't optimal yet (the `»` line seems particularly wasteful, and I have a 45-byte solution that is palindromic except for one character), but I guess it's a start.
[Answer]
# [Haskell](https://www.haskell.org/), 34 bytes
```
f=(==)=<<reverse--esrever<<=)==(=f
```
[Try it online!](https://tio.run/nexus/haskell#@59mq2Frq2lrY1OUWpZaVJyqq5taDGba2ACFgZJp/3MTM/MUbBUy80pSixKTSxRUFIoz8sv10v4T1gsA "Haskell – TIO Nexus") Call with `f "some string"`, returns `True` or `False`.
The `=<<` operator on functions works like `f=<<g = \s -> f (g s) s`, so the code is equivalent to `f s=s==reverse s`, which, as I just noticed, would result in the same byte count.
---
**Version without comment:** (49 bytes)
```
e x y=x/=y
p=e=<<reverse
esrever<<=e=p
y=/x=y x e
```
[Try it online!](https://tio.run/nexus/haskell#@5@qUKFQaVuhb1vJVWCbamtjU5RallpUnMqVWgxm2dgARQu4Km31K2wrgWpT/@cmZuYp2Cpk5pWkFiUmlyioKBRn5JfrFfwn2SgA "Haskell – TIO Nexus")
Call with `p "some string"`. This outputs `False` if the given string **is** a palindrome, and `True` if it's **not** a palindrome.
**Explanation:**
I found this comment free palindrome by starting with the comment version and replacing the the comment with a new line:
```
p=(==)=<<reverse
esrever<<=)==(=p
```
The second line fails because the parenthesis do not match, so we need to get rid of them. If we had a function `e` which checks for equality, then
```
p=e=<<reverse
esrever<<=e=p
```
will both compile with the second line defining an infix-operator `<<=` which takes two arguments `esrever` and `e` and returns the function `p`.
To define `e` as the equality function one would normally write `e=(==)`, but `)==(=e` will again not compile. Instead we could explicitly take two arguments and pass them to `==`: `e x y=x==y`. Now the reversed code `y==x=y x e` compiles but redefines the `==` operator, which causes the definition `e x y=x==y` to fail. However if we switch to the inequality operator `/=`, the reversed definition becomes `y=/x=y x e` and defines a `=/` operator which does not interferes with the original `/=` operator.
[Answer]
# [OIL](https://github.com/L3viathan/OIL), 178 bytes
Reads an input, explodes it, slowly adds its length (through incrementing and decrementing) to the address to know to the address after the string, jumps to a different part of code (in the middle), reverses the band direction, implodes the string again, and checks whether it's the same as the original string. TL;DR: It's a pain, as usual.
Outputs `40` if the string isn't a palindrome, `0` if it is.
```
5
0
12
0
40
1
40
2
1
40
34
10
2
3
22
16
9
2
8
35
6
11
6
37
3
4
4
27
26
0
1
10
1
40
13
2
31
04
1
01
1
0
62
72
4
4
3
73
6
11
6
53
8
2
9
61
22
3
2
01
43
04
1
2
04
1
04
0
21
0
5
```
[Answer]
# Java 8, ~~92~~ 90 bytes
This is a comment version. If a string contains its reverse, then it is a palindrome (`true`) otherwise it is not (`false`).
```
s->s.contains(new StringBuffer(s).reverse())//))(esrever.)s(reffuBgnirtS wen(sniatnoc.s>-s
```
---
[Try it online!](https://tio.run/##tU@9TsMwEJ6Tp7A62RJxH6CQoUPVhSkjYjDpOXJwzpbvnKpCffZgmrIwIBZuudP3d3ejmU0TIuB4el/cFENiMRZMZ3Ze24w9u4D6cB92dcxv3vWi94ZIPBuH4qOu7iCx4dLm4E5iKpTsODkcXl6FSQOpL2X1nfS4cg/7EDwYbIUVTws1Lek@IBczSYSzWFX7bC0kSUonmCERSKW2W6Uk0A3QimQCa/N@QJe4E2dASegMY@g1tQ0tVbUr27sLMUw6ZNaxBLNHabWJ0V/k5gjeB@/huFHqT9qbTvyo31z/99568rW@Lp8)
**Update**
* **-2** [18-04-05] Switched to contains. Thanks to [*@Kevin Cruijssen*](https://codegolf.stackexchange.com/questions/110582/im-a-palindrome-are-you/110667?noredirect=1#comment390293_110667)!
* **-2** [17-02-20] Removed `;`'s
* **-16** [17-02-22] Auto convert
[Answer]
# [Japt](https://github.com/ETHproductions/japt), ~~7~~ 2 bytes
```
êê
```
[Run it](https://ethproductions.github.io/japt/?v=1.4.6&code=6uo=&input=InJhY2VjYXIi)
### Old solution:
```
U¥UwU¥U
```
[Try it online!](https://tio.run/nexus/japt#@x96aGloOYj4/18JzlYCAA "Japt – TIO Nexus")
### Explanation
```
U¥UwU¥U
U¥        U is the input, ¥ is a shortcut for == 
  Uw      w is a reverse function.
    U¥U   This calculates U == U (always true), but the result is ignored
          because w does not look at its arguments.
```
Japt doesn't escape functions unless a closing parenthesis (or space) is reached.
This can be re-written: `U¥Uw(U¥U)`→`U¥Uw`→`U==Uw`. In Japt, the parenthesis left out at the begining and end of a function is auto-inserted.
[Answer]
# Dyalog APL, 6 bytes
```
⌽≡⊢⊢≡⌽
```
[Try it online!](https://tio.run/##SyzI0U2pTMzJT////1HP3kedCx91LQIhIKNn7/@0R20THvX2Peqb6un/qKv50HrjR20TgbzgIGcgGeLhGfw/TUE9MSlZnQtCJyWqAwA "APL (Dyalog Unicode) – Try It Online")
[Answer]
# [J](https://www.jsoftware.com), 9 bytes
```
[:-.|.-:[
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m70wa8F2JT0F9TRbK3UdBQMFKyDW1VNwDvJxW1pakqZrsTLaSlevRk_XKhrCv2mnyZWanJGvkKagnpiUnJSojsRF5lVUViE4cEPUIaYsWAChAQ)
Lolwut. I was fiddling with various arrangements and adverb trains until I realized `[:` in trains is a thing, and `-.` (boolean negation) is perfectly OK thanks to the permissive output format. Returns 0 if the input is palindrome and 1 otherwise.
```
[: -. (|. -: [)
       |. -: [   Reverse matches identity (classic palindrome check)
[: -.            Boolean negation on the result
```
---
# [J](https://www.jsoftware.com), 11 bytes
```
]&.|:-:|.&]
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m70wa8F2JT0F9TRbK3UdBQMFKyDW1VNwDvJxW1pakqZrsTpWTa_GSteqRk8tFiJy00GTKzU5I18hTUE9MSk5KVEdiYvMq6isQnCQjFGHmLNgAYQGAA)
Wins against the existing [comment abuse solution](https://codegolf.stackexchange.com/a/110774/78410). Uses a similar trick to [this answer to "I reverse the source, you reverse the input!"](https://codegolf.stackexchange.com/a/194789/78410).
Many of J's built-ins have inflections `.` and `:`, which are always treated as the suffix of a larger token. So the function above tokenizes as `] &. |: -: |. & ]`. And `&.` and `&` are conjunctions, which consume two things on both sides to form a single verb. Finally, `verb1 verb2 verb3` is a verb train; when given an argument `y`, it evaluates to `(verb1 y) verb2 (verb3 y)`.
```
] &. |: -: |. & ]
] &. |:             Identity under transpose: returns the input unchanged
           |. & ]   Reverse over identity: returns the input reversed
        -:          Match: tests if the two sides are identical
```
[Answer]
# [Bash](https://www.gnu.org/software/bash/) + Unix utilities, 49 bytes
```
[ "$1" = "`rev<<<$1`" ] # ] "`1$<<<ver`" = "1$" [
```
Input is passed as an argument.
Output is returned in the result code -- 0 for a palindrome, 1 for a non-palindrome.
*Maybe someone can do better and not just rely on a comment to make the code itself palindromic.*
[Try it online!](https://tio.run/nexus/bash#@x@toKRiqKRgq6CUUJRaZmNjo2KYoKQQq6AMxEoJhipAkbLUogSwCkMVJYXo////5@WXKCQqFCTmZOalFOXnpgIA "Bash – TIO Nexus")
[Answer]
# Java - ~~171~~ ~~169~~ 160 bytes
```
int q(String s){return s.equals(new StringBuffer(s).reverse().toString())?1:2;}//};2:1?))(gnirtSot.)(esrever.)s(reffuBgnirtS wen(slauqe.s nruter{)s gnirtS(q tni
```
The comment at the end is to make it a palindrome.
Returns `P(alindrome)` when the input is palindrome and `N(ot)` when not.
Ungolfed version:
```
int q(String s) {
    return s.equals(new StringBuffer(s).reverse().toString()) ? 'P' : 'N';
}//};'N':'P'?))(gnirtSot.)(esrever.)s(reffuBgnirtS wen(slauqe.s nruter{)s gnirtS(q tni
```
2 bytes saved thanks to @DLosc
Thanks to @Olivier Grégoire for pointing out the incorrect amount of bytes! Fixed now
[Answer]
# Javascript, 64 bytes
```
f=s=>s==[...s].reverse().join``//``nioj.)(esrever.]s...[==s>=s=f
```
Call function `f` with string
```
f("abba") // returns true
f("abab") // returns false
```
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 4 bytes
```
ḂŒŒḂ
```
[Try it online!](https://tio.run/##y0rNyan8///hjqajk45OAlL///9XT0xKTkpUBwA "Jelly – Try It Online")
Although this loses to the modern [`UƑU`](https://codegolf.stackexchange.com/a/166925/85334), I figured it may be of historical interest to note that [Dennis's solution](https://codegolf.stackexchange.com/a/110583/85334) could have been only 4 bytes. Thanks to [a quirk of the parser](https://github.com/DennisMitchell/jellylanguage/blob/c6ac722a4d2c7422c79ac4eeaa0c4abdad5fc16a/jelly.py#L589), any undefined characters--such as `Œ` outside a valid digraph--act equivalent to *two* newlines; as such, removing the newline yields a functionally identical solution (if not particularly forward-compatible, should `ŒŒ` ever hypothetically be added).
[Answer]
# [Actually](https://github.com/Mego/Seriously), 5 bytes
```
;R=R;
```
[Try it online!](https://tio.run/nexus/actually#@28dZBtk/f@/UmJSYpISAA "Actually – TIO Nexus")
The truthy output is `[1]\n[1]`, and the falsey output is `[]\n[]` (in both outputs, `\n` represents a literal newline).
Explanation:
```
;R=R;
;R=    duplicate input, reverse one copy, test equality (the main palindrome-testing part)
   R   range(1, x+1) - if palindrome, this pushes [1], else it pushes []
    ;  duplicate
```
[Answer]
# C++, 154 Bytes
```
int m(){std::string g,p="";g=p;std::reverse(p.begin(),p.end());return g==p;}//};p==g nruter;))(dne.p,)(nigeb.p(esrever::dts;p=g;""=p,g gnirts::dts{)(m tni
```
I have to say, the reverse statement was costly, but I can't imagine much I can do to change that. Being able to cut out the std:: symbols would save me around 10 characters, but "using namespace std;" is quite a few more.
I suppose C++ wasn't really meant for brevity.
[Answer]
## Prolog, 44 bytes
```
p-->[]|[_]|[E],p,[E].%.]E[,p,]E[|]_[|][>--p
```
This uses definite clause grammars. It is actually a full context free grammar:
```
p -->
      []            % the empty string
   |                % or
      [_]           % a one character string
   |                % or
      [E],          % one character, followed by
      p,            % a palindrome, followed by
      [E].          % that same character
```
Usage:
```
?- phrase(p,"reliefpfeiler").
true 
?- phrase(p,"re").
false.
```
]