4 ms·
Haskell. Here's another way to do it in the same language, using function composition and point-free style. map (chr . (+32)) [45, 69, 82, 82, 89, 0, 35, 72,
by malokai 12y ago
Haskell. Here's another way to do it in the same language, using function composition and point-free style.
map (chr . (+32)) [45, 69, 82, 82, 89, 0, 35, 72, 89, 73, 83, 84, 77, 65, 83, 1]
- tim333 12y agoMerry Xmas. I thought I'd try Haskell for the same time for Xmas and found I have to download it and import Data.Char first in case anyone else is trying!
- peterwwillis 12y agoOr in Perl: map{chr$_+32}(45,69,82,82,89,0,35,72,82,73,83,84,77,65,83,1) shorter using pack: # shorts pack("s*",25933,29298,8313,26691,26994,29811,24941,8563) # longs pack("l*",1920099661,1749229689,1953720690,561209709) # 64-bit pack("q*",7512884309367350605,2410377348306397554) # hex pack("h*",d45627279702348627963747d6163712)