Idiomatically determine all the lowercase and uppercase letters: Difference between revisions
Idiomatically determine all the lowercase and uppercase letters (view source)
Revision as of 11:01, 15 October 2020
, 3 years ago→{{header|Haskell}}: Reduced a little in terms of Data.Bifunctor
No edit summary |
m (→{{header|Haskell}}: Reduced a little in terms of Data.Bifunctor) |
||
Line 325:
And if we want to generalise a little beyond a narrowly Anglo-Saxon notion of the alphabet:
<lang Haskell>import Data.
import Data.
import Data.List (partition)
uppersAndLowers :: (String, String)
uppersAndLowers =
second
let glyphs = filter isPrint (chr <$> [1 .. 0x10ffff])▼
chunksOf :: Int -> [a] -> [[a]]
Line 343:
main :: IO ()
main = do
mapM_ putStrLn
putStrLn
mapM_ putStrLn
{{Out}}
<pre>Upper:
|