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:15, 15 October 2020
, 3 years ago→{{header|Haskell}}: Used Data.List.Split chunksOf (rather than defining one by hand) for a little more focus.
m (→{{header|Haskell}}: Reduced a little in terms of Data.Bifunctor) |
(→{{header|Haskell}}: Used Data.List.Split chunksOf (rather than defining one by hand) for a little more focus.) |
||
Line 328:
import Data.Bifunctor (second)
import Data.List (partition)
import Data.List.Split (chunksOf)
uppersAndLowers :: (String, String)
Line 334 ⟶ 335:
(fst . partition isLower)
(partition isUpper $ filter isPrint (chr <$> [1 .. 0x10ffff]))
main :: IO ()
|