Skip to main content
Commonmark migration
Source Link

Brachylog, 6 bytes

{÷|%}ᶠ

Try it online!

###Explanation

Explanation

We abuse the metapredicate ᶠ findall to apply two different predicates to the Input list of two arguments:

{   }ᶠ         Findall for the Input [A,B] :
 ÷               Integer division
  |              Or…
   %             Modulo

Brachylog, 6 bytes

{÷|%}ᶠ

Try it online!

###Explanation

We abuse the metapredicate ᶠ findall to apply two different predicates to the Input list of two arguments:

{   }ᶠ         Findall for the Input [A,B] :
 ÷               Integer division
  |              Or…
   %             Modulo

Brachylog, 6 bytes

{÷|%}ᶠ

Try it online!

Explanation

We abuse the metapredicate ᶠ findall to apply two different predicates to the Input list of two arguments:

{   }ᶠ         Findall for the Input [A,B] :
 ÷               Integer division
  |              Or…
   %             Modulo
Source Link
Fatalize
  • 39.3k
  • 5
  • 70
  • 162

Brachylog, 6 bytes

{÷|%}ᶠ

Try it online!

###Explanation

We abuse the metapredicate ᶠ findall to apply two different predicates to the Input list of two arguments:

{   }ᶠ         Findall for the Input [A,B] :
 ÷               Integer division
  |              Or…
   %             Modulo