Skip to main content
Commonmark migration
Source Link

#Pyth - 8 7 6

Pyth - 8 7 6

MqSGSH

Defines function with two args, the two words.

M       define function g with two args, G and H
 q       equals
  SQ     sorted first arg
  SH     sorted last arg

If that cheating golfscript program counts with hardcoded input, we can do that too with : qSS

And for just two more characters you can have it check an infinite number of words:

ql{mSdQ1

q    1       Equals 1
 l           Length
  {          Set constructor (eliminate all duplicates)
   m  Q      Map on evaluated input
    Sd       Sort each element

#Pyth - 8 7 6

MqSGSH

Defines function with two args, the two words.

M       define function g with two args, G and H
 q       equals
  SQ     sorted first arg
  SH     sorted last arg

If that cheating golfscript program counts with hardcoded input, we can do that too with : qSS

And for just two more characters you can have it check an infinite number of words:

ql{mSdQ1

q    1       Equals 1
 l           Length
  {          Set constructor (eliminate all duplicates)
   m  Q      Map on evaluated input
    Sd       Sort each element

Pyth - 8 7 6

MqSGSH

Defines function with two args, the two words.

M       define function g with two args, G and H
 q       equals
  SQ     sorted first arg
  SH     sorted last arg

If that cheating golfscript program counts with hardcoded input, we can do that too with : qSS

And for just two more characters you can have it check an infinite number of words:

ql{mSdQ1

q    1       Equals 1
 l           Length
  {          Set constructor (eliminate all duplicates)
   m  Q      Map on evaluated input
    Sd       Sort each element
deleted 31 characters in body
Source Link
Maltysen
  • 25.8k
  • 4
  • 55
  • 127

#Pyth - 8 77 6

qShQSeQMqSGSH

Guess who is an idiot and forgot the end command. I am. :( OtherwiseDefines function with two args, very simplethe two words.

M       define function g with two args, G and H
 q       equals
ShQ  SQ     sorted first elementarg
 of input
SeQSH     sorted last element of inputarg

If that cheating golfscript program counts with hardcoded input, we can do that too with : qSS

And for just onetwo more charactercharacters you can have it check an infinite number of words:

ql{mSdQ1

qlq    1   the length of the follwoingEquals equals1
{ l       set constructor (eliminate all duplicates)Length
mSd  {    map the function sort the elment toSet theconstructor follwing(eliminate all duplicates)
Q   m  Q   the   Map on evaluated input
1    Sd     does it equalSort toeach 1element

#Pyth - 8 7

qShQSeQ

Guess who is an idiot and forgot the end command. I am. :( Otherwise, very simple.

q       equals
ShQ     sorted first element of input
SeQ     sorted last element of input

If that cheating golfscript program counts with hardcoded input, we can do that too with : qSS

And for just one more character you can have it check an infinite number of words

ql{mSdQ1

ql       the length of the follwoing equals
{        set constructor (eliminate all duplicates)
mSd      map the function sort the elment to the follwing
Q        the evaluated input
1        does it equal to 1

#Pyth - 8 7 6

MqSGSH

Defines function with two args, the two words.

M       define function g with two args, G and H
 q       equals
  SQ     sorted first arg
  SH     sorted last arg

If that cheating golfscript program counts with hardcoded input, we can do that too with : qSS

And for just two more characters you can have it check an infinite number of words:

ql{mSdQ1

q    1       Equals 1
 l           Length
  {          Set constructor (eliminate all duplicates)
   m  Q      Map on evaluated input
    Sd       Sort each element
added 439 characters in body
Source Link
Maltysen
  • 25.8k
  • 4
  • 55
  • 127

#Pyth - 8 7

qShQSeQ

Guess who is an idiot and forgot the end command. I am. :( Otherwise, very simple.

q       equals
ShQ     sorted first elmentelement of input
SeQ     sorted last element of input

If that cheating golfscript program counts with hardcoded input, we can do that too with : qSS

And for just one more character you can have it check an infinite number of words

ql{mSdQ1

ql       the length of the follwoing equals
{        set constructor (eliminate all duplicates)
mSd      map the function sort the elment to the follwing
Q        the evaluated input
1        does it equal to 1

#Pyth - 8 7

qShQSeQ

Guess who is an idiot and forgot the end command. I am. :( Otherwise, very simple.

q       equals
ShQ     sorted first elment of input
SeQ     sorted last element of input

#Pyth - 8 7

qShQSeQ

Guess who is an idiot and forgot the end command. I am. :( Otherwise, very simple.

q       equals
ShQ     sorted first element of input
SeQ     sorted last element of input

If that cheating golfscript program counts with hardcoded input, we can do that too with : qSS

And for just one more character you can have it check an infinite number of words

ql{mSdQ1

ql       the length of the follwoing equals
{        set constructor (eliminate all duplicates)
mSd      map the function sort the elment to the follwing
Q        the evaluated input
1        does it equal to 1
added 19 characters in body
Source Link
Maltysen
  • 25.8k
  • 4
  • 55
  • 127
Loading
added 60 characters in body
Source Link
Maltysen
  • 25.8k
  • 4
  • 55
  • 127
Loading
Source Link
Maltysen
  • 25.8k
  • 4
  • 55
  • 127
Loading