#Pyth , 6 bytes
Pyth , 6 bytes
>1{I#C
The output is a singleton list, as allowed by default; the list [ ] (empty list, falsy) is returned in case the string cannot be enklactified.
Explanation
>1{I#C – Full program.
C – Transpose the input, cropping absences.
# – Filter by:
{I – Invariant under deduplication.>1 – Slice to 1. list[:1] in Python.
Pyth, 5 bytes
This would've been valid if crashing would have counted as a falsy value.
h{I#C
#Pyth , 6 bytes
>1{I#C
The output is a singleton list, as allowed by default; the list [ ] (empty list, falsy) is returned in case the string cannot be enklactified.
Explanation
>1{I#C – Full program.
C – Transpose the input, cropping absences.
# – Filter by:
{I – Invariant under deduplication.>1 – Slice to 1. list[:1] in Python.
Pyth, 5 bytes
This would've been valid if crashing would have counted as a falsy value.
h{I#C
Pyth , 6 bytes
>1{I#C
The output is a singleton list, as allowed by default; the list [ ] (empty list, falsy) is returned in case the string cannot be enklactified.
Explanation
>1{I#C – Full program.
C – Transpose the input, cropping absences.
# – Filter by:
{I – Invariant under deduplication.>1 – Slice to 1. list[:1] in Python.
Pyth, 5 bytes
This would've been valid if crashing would have counted as a falsy value.
h{I#C
#Pyth, 6 bytes
>1{I#C
The output is a singleton list, as allowed by default; the list [ ] (empty list, falsy) is returned in case the string cannot be enklactified.
Explanation
>1{I#C – Full program.
C – Transpose the input, cropping absences.
# – Filter by:
{I – Invariant under deduplicatingdeduplication.>1 – Slice to 1. list[:1] in Python.
Pyth, 5 bytes
This would've been valid if crashing would have counted as a falsy value.
h{I#C
#Pyth, 6 bytes
>1{I#C
The output is a singleton list, as allowed by default; the list [ ] (empty list, falsy) is returned in case the string cannot be enklactified.
Explanation
>1{I#C – Full program.
C – Transpose the input, cropping absences.
# – Filter by:
{I – Invariant under deduplicating.>1 – Slice to 1. list[:1] in Python.
Pyth, 5 bytes
This would've been valid if crashing would have counted as a falsy value.
h{I#C
#Pyth, 6 bytes
>1{I#C
The output is a singleton list, as allowed by default; the list [ ] (empty list, falsy) is returned in case the string cannot be enklactified.
Explanation
>1{I#C – Full program.
C – Transpose the input, cropping absences.
# – Filter by:
{I – Invariant under deduplication.>1 – Slice to 1. list[:1] in Python.
Pyth, 5 bytes
This would've been valid if crashing would have counted as a falsy value.
h{I#C
#Pyth, 6 bytes
>1{I#C
The output is a singleton list, as allowed by default; the list [ ] (empty list, falsy) is returned in case the string cannot be enklactified.
Explanation
>1{I#C – Full program.
C – Transpose the input, cropping absences.
# – Filter by:
{I – Invariant under deduplicating.>1 – Slice to 1. list[:1] in Python.
Pyth , 5 bytes (awaiting OP's response )
Pyth , 5 bytes
This would've been valid if crashing would have counted as a falsy value.
h{I#C
If throwing a consistent error is an acceptable falsy value (I honestly hope it will be), then this will become the main solution, crashing with:
Traceback (most recent call last):
File "pyth.py", line 771, in <module>
File "<string>", line 4, in <module>
File "/app/macros.py", line 727, in head
IndexError: list index out of range
#Pyth, 6 bytes
>1{I#C
The output is a singleton list, as allowed by default; the list [ ] (empty list, falsy) is returned in case the string cannot be enklactified.
Explanation
>1{I#C – Full program.
C – Transpose the input, cropping absences.
# – Filter by:
{I – Invariant under deduplicating.>1 – Slice to 1. list[:1] in Python.
Pyth , 5 bytes (awaiting OP's response )
h{I#C
If throwing a consistent error is an acceptable falsy value (I honestly hope it will be), then this will become the main solution, crashing with:
Traceback (most recent call last):
File "pyth.py", line 771, in <module>
File "<string>", line 4, in <module>
File "/app/macros.py", line 727, in head
IndexError: list index out of range
#Pyth, 6 bytes
>1{I#C
The output is a singleton list, as allowed by default; the list [ ] (empty list, falsy) is returned in case the string cannot be enklactified.
Explanation
>1{I#C – Full program.
C – Transpose the input, cropping absences.
# – Filter by:
{I – Invariant under deduplicating.>1 – Slice to 1. list[:1] in Python.
Pyth , 5 bytes
This would've been valid if crashing would have counted as a falsy value.
h{I#C