Hacker News new | past | comments | ask | show | jobs | submit login

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]


Merry 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!


Or 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)




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: