Skip to main content
added 57 characters in body
Source Link
J. Sallé
  • 3.5k
  • 10
  • 24

APL (Dyalog Unicode), 13 3 bytes

⊢⍝-∘0 

Try it online!Try it online!

Trivial answer. Returns arg or ¯arg.

Saved 10 bytes by not being dumb (thanks Adám).

Altered the resulting 3-byter to a more fitting function.

APL (Dyalog Unicode), 13 3 bytes

⊢⍝- 

Try it online!

Trivial answer. Returns arg or ¯arg.

Saved 10 bytes by not being dumb (thanks Adám).

APL (Dyalog Unicode), 13 3 bytes

-∘0 

Try it online!

Trivial answer. Returns arg or ¯arg.

Saved 10 bytes by not being dumb (thanks Adám).

Altered the resulting 3-byter to a more fitting function.

added 25 characters in body
Source Link
J. Sallé
  • 3.5k
  • 10
  • 24

APL (Dyalog Unicode), 1313 3 bytes

(⊢-∘0)⍝)⊢⊢⍝-∘0( 

Try it online!Try it online!

Trivial answer. Returns arg-0 or 0-arg¯arg.

Saved 10 bytes by not being dumb (thanks Adám).

APL (Dyalog Unicode), 13 bytes

(⊢-∘0)⍝)⊢-∘0( 

Try it online!

Trivial answer. Returns arg-0 or 0-arg.

APL (Dyalog Unicode), 13 3 bytes

⊢⍝- 

Try it online!

Trivial answer. Returns arg or ¯arg.

Saved 10 bytes by not being dumb (thanks Adám).

Source Link
J. Sallé
  • 3.5k
  • 10
  • 24

APL (Dyalog Unicode), 13 bytes

(⊢-∘0)⍝)⊢-∘0( 

Try it online!

Trivial answer. Returns arg-0 or 0-arg.