Skip to main content
added 80 characters in body
Source Link
Shaggy
  • 45k
  • 4
  • 39
  • 95

Japt, 22 21 bytes

Work in progress

r`%ß@%b`È3ÇXvÃqXû5}'i 

Try itTry it

Original (w/ -S flag)

¸cÈv ¶`ß@`Å?5ogX¸iXv:X 

Try itTry it

¸cÈv ¶`ß@`Å?5ogX¸iXv:X :Implicit input of string ¸ :Split on spaces c :Map then flatten È :Passing each X through the following function v : Lowercase ¶ : Test for equality with `ß@` : The compressed string "band" ("and" compressed is also 2 bytes but includes the "d") Å : Slice off the first character ? : If true 5o : Range [0,5) g : Index (0-based) each into X¸ : Split X on spaces, converting it to a single element array i : Prepend Xv : Lowercase X :X : Else return X :Implicit output joined by spaces 

Japt, 22 21 bytes

Work in progress

r`%ß@%b`È3ÇXvÃqXû5}'i 

Try it

Original (w/ -S flag)

¸cÈv ¶`ß@`Å?5ogX¸iXv:X 

Try it

¸cÈv ¶`ß@`Å?5ogX¸iXv:X :Implicit input of string ¸ :Split on spaces c :Map then flatten È :Passing each X through the following function v : Lowercase ¶ : Test for equality with `ß@` : The compressed string "band" ("and" compressed is also 2 bytes but includes the "d") Å : Slice off the first character ? : If true 5o : Range [0,5) g : Index (0-based) each into X¸ : Split X on spaces, converting it to a single element array i : Prepend Xv : Lowercase X :X : Else return X :Implicit output joined by spaces 

Japt, 22 21 bytes

Work in progress

r`%ß@%b`È3ÇXvÃqXû5}'i 

Try it

Original (w/ -S flag)

¸cÈv ¶`ß@`Å?5ogX¸iXv:X 

Try it

¸cÈv ¶`ß@`Å?5ogX¸iXv:X :Implicit input of string ¸ :Split on spaces c :Map then flatten È :Passing each X through the following function v : Lowercase ¶ : Test for equality with `ß@` : The compressed string "band" ("and" compressed is also 2 bytes but includes the "d") Å : Slice off the first character ? : If true 5o : Range [0,5) g : Index (0-based) each into X¸ : Split X on spaces, converting it to a single element array i : Prepend Xv : Lowercase X :X : Else return X :Implicit output joined by spaces 
added 77 characters in body
Source Link
Shaggy
  • 45k
  • 4
  • 39
  • 95

Japt -S, 22 22 21 bytes

-1 byte if we can take input as an array of words. Work in progress

r`%ß@%b`È3ÇXvÃqXû5}'i 

Try it

Original (w/ -S flag)

¸cÈv ¶`ß@`Å?5ogX¸iXv:X 

Try it

¸cÈv ¶`ß@`Å?5ogX¸iXv:X :Implicit input of string ¸ :Split on spaces c :Map then flatten È :Passing each X through the following function v : Lowercase ¶ : Test for equality with `ß@` : The compressed string "band" ("and" compressed is also 2 bytes but includes the "d") Å : Slice off the first character ? : If true 5o : Range [0,5) g : Index (0-based) each into X¸ : Split X on spaces, converting it to a single element array i : Prepend Xv : Lowercase X :X : Else return X :Implicit output joined by spaces 

Japt -S, 22 bytes

-1 byte if we can take input as an array of words.

¸cÈv ¶`ß@`Å?5ogX¸iXv:X 

Try it

¸cÈv ¶`ß@`Å?5ogX¸iXv:X :Implicit input of string ¸ :Split on spaces c :Map then flatten È :Passing each X through the following function v : Lowercase ¶ : Test for equality with `ß@` : The compressed string "band" ("and" compressed is also 2 bytes but includes the "d") Å : Slice off the first character ? : If true 5o : Range [0,5) g : Index (0-based) each into X¸ : Split X on spaces, converting it to a single element array i : Prepend Xv : Lowercase X :X : Else return X :Implicit output joined by spaces 

Japt, 22 21 bytes

Work in progress

r`%ß@%b`È3ÇXvÃqXû5}'i 

Try it

Original (w/ -S flag)

¸cÈv ¶`ß@`Å?5ogX¸iXv:X 

Try it

¸cÈv ¶`ß@`Å?5ogX¸iXv:X :Implicit input of string ¸ :Split on spaces c :Map then flatten È :Passing each X through the following function v : Lowercase ¶ : Test for equality with `ß@` : The compressed string "band" ("and" compressed is also 2 bytes but includes the "d") Å : Slice off the first character ? : If true 5o : Range [0,5) g : Index (0-based) each into X¸ : Split X on spaces, converting it to a single element array i : Prepend Xv : Lowercase X :X : Else return X :Implicit output joined by spaces 
added 998 characters in body
Source Link
Shaggy
  • 45k
  • 4
  • 39
  • 95

Japt -S, 22 bytes

-1 byte if we can take input as an array of words.

¸cÈv ¶`ß@`Å?5ogX¸iXv:X 

Try it

¸cÈv ¶`ß@`Å?5ogX¸iXv:X :Implicit input of string ¸ :Split on spaces c :Map then flatten È :Passing each X through the following function v : Lowercase ¶ : Test for equality with `ß@` : The compressed string "band" ("and" compressed is also 2 bytes but includes the "d") Å : Slice off the first character ? : If true 5o : Range [0,5) g : Index (0-based) each into X¸ : Split X on spaces, converting it to a single element array i : Prepend Xv : Lowercase X :X : Else return X :Implicit output joined by spaces 

Japt -S, 22 bytes

-1 byte if we can take input as an array of words.

¸cÈv ¶`ß@`Å?5ogX¸iXv:X 

Try it

Japt -S, 22 bytes

-1 byte if we can take input as an array of words.

¸cÈv ¶`ß@`Å?5ogX¸iXv:X 

Try it

¸cÈv ¶`ß@`Å?5ogX¸iXv:X :Implicit input of string ¸ :Split on spaces c :Map then flatten È :Passing each X through the following function v : Lowercase ¶ : Test for equality with `ß@` : The compressed string "band" ("and" compressed is also 2 bytes but includes the "d") Å : Slice off the first character ? : If true 5o : Range [0,5) g : Index (0-based) each into X¸ : Split X on spaces, converting it to a single element array i : Prepend Xv : Lowercase X :X : Else return X :Implicit output joined by spaces 
Source Link
Shaggy
  • 45k
  • 4
  • 39
  • 95
Loading