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

#Haskell, (削除) 56 (削除ここまで)(削除) 53 (削除ここまで) 52 Bytes

Haskell, (削除) 56 (削除ここまで)(削除) 53 (削除ここまで) 52 Bytes

mapM(\x->putStrLn$init$[x..'Z']++['A'..x])['A'..'Z']

same length: (using a suggestion by @AndersKaseorg)

a=['A'..'Z']
mapM putStrLn[take 26$[x..'Z']++a|x<-a]

to do modular stuff you have to import Data.Char to get the chr function, (削除) 74 (削除ここまで) (削除) 59 (削除ここまで) 58 Bytes was the best I could get with that: (thanks to @nimi for suggesting the toEnum function)

a=[0..25]
mapM(\x->putStrLn[toEnum65ドル+(x+y)`mod`26|y<-a])a

This could probably be much shorter, but I don't know any Haskell golfing tricks.

used mapM instead of mapM_ (see @Lynn's comment)

#Haskell, (削除) 56 (削除ここまで)(削除) 53 (削除ここまで) 52 Bytes

mapM(\x->putStrLn$init$[x..'Z']++['A'..x])['A'..'Z']

same length: (using a suggestion by @AndersKaseorg)

a=['A'..'Z']
mapM putStrLn[take 26$[x..'Z']++a|x<-a]

to do modular stuff you have to import Data.Char to get the chr function, (削除) 74 (削除ここまで) (削除) 59 (削除ここまで) 58 Bytes was the best I could get with that: (thanks to @nimi for suggesting the toEnum function)

a=[0..25]
mapM(\x->putStrLn[toEnum65ドル+(x+y)`mod`26|y<-a])a

This could probably be much shorter, but I don't know any Haskell golfing tricks.

used mapM instead of mapM_ (see @Lynn's comment)

Haskell, (削除) 56 (削除ここまで)(削除) 53 (削除ここまで) 52 Bytes

mapM(\x->putStrLn$init$[x..'Z']++['A'..x])['A'..'Z']

same length: (using a suggestion by @AndersKaseorg)

a=['A'..'Z']
mapM putStrLn[take 26$[x..'Z']++a|x<-a]

to do modular stuff you have to import Data.Char to get the chr function, (削除) 74 (削除ここまで) (削除) 59 (削除ここまで) 58 Bytes was the best I could get with that: (thanks to @nimi for suggesting the toEnum function)

a=[0..25]
mapM(\x->putStrLn[toEnum65ドル+(x+y)`mod`26|y<-a])a

This could probably be much shorter, but I don't know any Haskell golfing tricks.

used mapM instead of mapM_ (see @Lynn's comment)

added 71 characters in body
Source Link
KarlKastor
  • 2.4k
  • 1
  • 16
  • 17

#Haskell, (削除) 56 (削除ここまで) 53(削除) 53 (削除ここまで) 52 Bytes

mapM_mapM(\x->putStrLn$init$[x..'Z']++['A'..x])['A'..'Z']

same length: (using a suggestion by @AndersKaseorg)

a=['A'..'Z']
mapM_mapM putStrLn[take 26$[x..'Z']++a|x<-a]

to do modular stuff you have to import Data.Char to get the chr function, (削除) 74 (削除ここまで) 59(削除) 59 (削除ここまで) 58 Bytes was the best I could get with that: (thanks to @nimi for suggesting the toEnum function)

a=[0..25]
mapM_mapM(\x->putStrLn[toEnum65ドル+(x+y)`mod`26|y<-a])a

This could probably be much shorter, but I don't know any Haskell golfing tricks.

used mapM instead of mapM_ (see @Lynn's comment)

#Haskell, (削除) 56 (削除ここまで) 53 Bytes

mapM_(\x->putStrLn$init$[x..'Z']++['A'..x])['A'..'Z']

same length: (using a suggestion by @AndersKaseorg)

a=['A'..'Z']
mapM_ putStrLn[take 26$[x..'Z']++a|x<-a]

to do modular stuff you have to import Data.Char to get the chr function, (削除) 74 (削除ここまで) 59 Bytes was the best I could get with that: (thanks to @nimi for suggesting the toEnum function)

a=[0..25]
mapM_(\x->putStrLn[toEnum65ドル+(x+y)`mod`26|y<-a])a

This could probably be much shorter, but I don't know any Haskell golfing tricks.

#Haskell, (削除) 56 (削除ここまで) (削除) 53 (削除ここまで) 52 Bytes

mapM(\x->putStrLn$init$[x..'Z']++['A'..x])['A'..'Z']

same length: (using a suggestion by @AndersKaseorg)

a=['A'..'Z']
mapM putStrLn[take 26$[x..'Z']++a|x<-a]

to do modular stuff you have to import Data.Char to get the chr function, (削除) 74 (削除ここまで) (削除) 59 (削除ここまで) 58 Bytes was the best I could get with that: (thanks to @nimi for suggesting the toEnum function)

a=[0..25]
mapM(\x->putStrLn[toEnum65ドル+(x+y)`mod`26|y<-a])a

This could probably be much shorter, but I don't know any Haskell golfing tricks.

used mapM instead of mapM_ (see @Lynn's comment)

added 43 characters in body
Source Link
KarlKastor
  • 2.4k
  • 1
  • 16
  • 17

#Haskell, (削除) 56 (削除ここまで) 53 Bytes

mapM_(\x->putStrLn$init$[x..'Z']++['A'..x])['A'..'Z']

same length: (using a suggestion by @AndersKaseorg)

a=['A'..'Z']
mapM_ putStrLn[take 26$[x..'Z']++a|x<-a]

to do modular stuff you have to import Data.Char to get the chr function, 74(削除) 74 (削除ここまで) 59 Bytes was the best I could get with that: (thanks to @nimi for suggesting the toEnum function)

import Data.Char
a=[0..25]
mapM_(\x->putStrLn[chr(65+>putStrLn[toEnum65ドル+(x+y)`mod`26)|y<`mod`26|y<-a])a

This could probably be much shorter, but I don't know any Haskell golfing tricks.

#Haskell, (削除) 56 (削除ここまで) 53 Bytes

mapM_(\x->putStrLn$init$[x..'Z']++['A'..x])['A'..'Z']

same length: (using a suggestion by @AndersKaseorg)

a=['A'..'Z']
mapM_ putStrLn[take 26$[x..'Z']++a|x<-a]

to do modular stuff you have to import Data.Char to get the chr function, 74 Bytes was the best I could get with that:

import Data.Char
a=[0..25]
mapM_(\x->putStrLn[chr(65+(x+y)`mod`26)|y<-a])a

This could probably be much shorter, but I don't know any Haskell golfing tricks.

#Haskell, (削除) 56 (削除ここまで) 53 Bytes

mapM_(\x->putStrLn$init$[x..'Z']++['A'..x])['A'..'Z']

same length: (using a suggestion by @AndersKaseorg)

a=['A'..'Z']
mapM_ putStrLn[take 26$[x..'Z']++a|x<-a]

to do modular stuff you have to import Data.Char to get the chr function, (削除) 74 (削除ここまで) 59 Bytes was the best I could get with that: (thanks to @nimi for suggesting the toEnum function)

a=[0..25]
mapM_(\x->putStrLn[toEnum65ドル+(x+y)`mod`26|y<-a])a

This could probably be much shorter, but I don't know any Haskell golfing tricks.

added 13 characters in body
Source Link
KarlKastor
  • 2.4k
  • 1
  • 16
  • 17
Loading
added 2 characters in body
Source Link
KarlKastor
  • 2.4k
  • 1
  • 16
  • 17
Loading
Source Link
KarlKastor
  • 2.4k
  • 1
  • 16
  • 17
Loading

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