Skip to main content
added 306 characters in body
Source Link
flawr
  • 43.9k
  • 7
  • 104
  • 249

Haskell, 5858 55 bytes

-3 bytes thanks to @Laikoni!

map f
f c|Just k<(\c-lookup c$zip"BEISbeis""83158315"=k
f c=c>last$c:[b|(a,b)<-zip"BEISbeis""83158315",a==c])

Try it online!Try it online!

Haskell, 58 bytes

map f
f c|Just k<-lookup c$zip"BEISbeis""83158315"=k
f c=c

Try it online!

Haskell, 58 55 bytes

-3 bytes thanks to @Laikoni!

map(\c->last$c:[b|(a,b)<-zip"BEISbeis""83158315",a==c])

Try it online!

Source Link
flawr
  • 43.9k
  • 7
  • 104
  • 249

Haskell, 58 bytes

map f
f c|Just k<-lookup c$zip"BEISbeis""83158315"=k
f c=c

Try it online!