Skip to main content
Commonmark migration
Source Link

#Jelly, 5 3 bytes

Jelly, 5 3 bytes

Thanks to @Sp3000 for saving two bytes!

Code, uses quite the same algorithm as @xnor's great answer:

SfḤ

Explanation:

S     # Sum of the argument list
  Ḥ   # Double the list
 f    # Filter, remove everything that isn't equal to the sum of the list

This gives [] as falsy, and anything else as truthy.

Try it online!

#Jelly, 5 3 bytes

Thanks to @Sp3000 for saving two bytes!

Code, uses quite the same algorithm as @xnor's great answer:

SfḤ

Explanation:

S     # Sum of the argument list
  Ḥ   # Double the list
 f    # Filter, remove everything that isn't equal to the sum of the list

This gives [] as falsy, and anything else as truthy.

Try it online!

Jelly, 5 3 bytes

Thanks to @Sp3000 for saving two bytes!

Code, uses quite the same algorithm as @xnor's great answer:

SfḤ

Explanation:

S     # Sum of the argument list
  Ḥ   # Double the list
 f    # Filter, remove everything that isn't equal to the sum of the list

This gives [] as falsy, and anything else as truthy.

Try it online!

replaced http://codegolf.stackexchange.com/ with https://codegolf.stackexchange.com/
Source Link

#Jelly, 5 3 bytes

Thanks to @Sp3000@Sp3000 for saving two bytes!

Code, uses quite the same algorithm as @xnor's great answer@xnor's great answer:

SfḤ

Explanation:

S     # Sum of the argument list
  Ḥ   # Double the list
 f    # Filter, remove everything that isn't equal to the sum of the list

This gives [] as falsy, and anything else as truthy.

Try it online!

#Jelly, 5 3 bytes

Thanks to @Sp3000 for saving two bytes!

Code, uses quite the same algorithm as @xnor's great answer:

SfḤ

Explanation:

S     # Sum of the argument list
  Ḥ   # Double the list
 f    # Filter, remove everything that isn't equal to the sum of the list

This gives [] as falsy, and anything else as truthy.

Try it online!

#Jelly, 5 3 bytes

Thanks to @Sp3000 for saving two bytes!

Code, uses quite the same algorithm as @xnor's great answer:

SfḤ

Explanation:

S     # Sum of the argument list
  Ḥ   # Double the list
 f    # Filter, remove everything that isn't equal to the sum of the list

This gives [] as falsy, and anything else as truthy.

Try it online!

deleted 1 character in body
Source Link
Adnan
  • 44.7k
  • 6
  • 83
  • 248

#Jelly, 5 3 bytes

Thanks to @Sp3000 for saving two bytes!

Code, uses quite the same algorithm as @xnor's great answer:

SfḤ

Explanation:

S     # Sum of the argument list
  Ḥ   # Double the list
 f    # Filter, remove everything that isn't equal to the sum of the list

This gives [] as falsy, and anything else as truthy.

Try it online!Try it online!

#Jelly, 5 3 bytes

Thanks to @Sp3000 for saving two bytes!

Code, uses quite the same algorithm as @xnor's great answer:

SfḤ

Explanation:

S     # Sum of the argument list
  Ḥ   # Double the list
 f    # Filter, remove everything that isn't equal to the sum of the list

This gives [] as falsy, and anything else as truthy.

Try it online!

#Jelly, 5 3 bytes

Thanks to @Sp3000 for saving two bytes!

Code, uses quite the same algorithm as @xnor's great answer:

SfḤ

Explanation:

S     # Sum of the argument list
  Ḥ   # Double the list
 f    # Filter, remove everything that isn't equal to the sum of the list

This gives [] as falsy, and anything else as truthy.

Try it online!

added 72 characters in body
Source Link
Adnan
  • 44.7k
  • 6
  • 83
  • 248
Loading
added 230 characters in body
Source Link
Adnan
  • 44.7k
  • 6
  • 83
  • 248
Loading
Source Link
Adnan
  • 44.7k
  • 6
  • 83
  • 248
Loading