Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

Commonmark migration
Source Link

Brachylog, 9 bytes

{⊇m=∧?t}l

Try it online!

Note that this not only works with a list of integers, but also with a list of strings or a list of lists.

###Explanation

Explanation

{ }l Left fold on the input:
 ⊇m= It is possible to find a number which is a subset of both input numbers
 ∧ (and)
 ?t The output is the second number (to continue the fold)

Brachylog, 9 bytes

{⊇m=∧?t}l

Try it online!

Note that this not only works with a list of integers, but also with a list of strings or a list of lists.

###Explanation

{ }l Left fold on the input:
 ⊇m= It is possible to find a number which is a subset of both input numbers
 ∧ (and)
 ?t The output is the second number (to continue the fold)

Brachylog, 9 bytes

{⊇m=∧?t}l

Try it online!

Note that this not only works with a list of integers, but also with a list of strings or a list of lists.

Explanation

{ }l Left fold on the input:
 ⊇m= It is possible to find a number which is a subset of both input numbers
 ∧ (and)
 ?t The output is the second number (to continue the fold)
added 110 characters in body
Source Link
Fatalize
  • 39.6k
  • 5
  • 73
  • 165

Brachylog, 9 bytes

{⊇m=∧?t}l

Try it online!

Note that this not only works with a list of integers, but also with a list of strings or a list of lists.

###Explanation

{ }l Left fold on the input:
 ⊇m= It is possible to find a number which is a subset of both input numbers
 ∧ (and)
 ?t The output is the second number (to continue the fold)

Brachylog, 9 bytes

{⊇m=∧?t}l

Try it online!

###Explanation

{ }l Left fold on the input:
 ⊇m= It is possible to find a number which is a subset of both input numbers
 ∧ (and)
 ?t The output is the second number (to continue the fold)

Brachylog, 9 bytes

{⊇m=∧?t}l

Try it online!

Note that this not only works with a list of integers, but also with a list of strings or a list of lists.

###Explanation

{ }l Left fold on the input:
 ⊇m= It is possible to find a number which is a subset of both input numbers
 ∧ (and)
 ?t The output is the second number (to continue the fold)
Source Link
Fatalize
  • 39.6k
  • 5
  • 73
  • 165

Brachylog, 9 bytes

{⊇m=∧?t}l

Try it online!

###Explanation

{ }l Left fold on the input:
 ⊇m= It is possible to find a number which is a subset of both input numbers
 ∧ (and)
 ?t The output is the second number (to continue the fold)

AltStyle によって変換されたページ (->オリジナル) /