map (\x -> chr (x + 32)) [45,69,82,82,89,0,35,72,82,73,83,84,77,65,83,1]
[deleted]
51–60 of 122 posts
map (\x -> chr (x + 32)) [45,69,82,82,89,0,35,72,82,73,83,84,77,65,83,1]
map (\x -> chr (x + 32)) [45,69,82,82,89,0,35,72,82,73,83,84,77,65,83,1]
#include
#include
#include
using namespace std;
int main() {
string s {33,78,68,0,65,0,40,65,80,80,89,0,46,69,87,0,57,69,65,82,0,79,70,0,
70,85,78,67,84,73,79,78,65,76,0,67,79,68,69,0,84,79,0,89,79,85,0,
84,79,79,12,0,51,73,82,1};
transform (begin(s), end(s), begin(s), [](char c){ return c + 32; });
cout Earlier quoted context omitted.
What language is this?
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]
Oh, Huxley.