Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
D7x7w9pHnT
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
3 ms
·
1.
▲
by
D7x7w9pHnT
5y ago
Super cool! I've seen comments about eventually being able to get a keyboard with full arrow keys, but will they ever ship a keyboard with a trackpoint/pointing stick? Or is that patented by Lenovo?
2.
▲
by
D7x7w9pHnT
5y ago
lol totally Did this in Haskell, and since all the lower numbers are known, started searching at 2^361 To end the recursion I just have it print -1 when it reaches 1 f :: Integer -> Integer f n | n == 1 = -1 | even
3.
▲
by
D7x7w9pHnT
5y ago
For 0 being a FizzBuzz you can `cons` a "FizzBuzz" to the start of the list fizzbuzz = "FizzBuzz" : zipWith... To make negative numbers work you'd need a new numbers definition numbers = map show [-1, -2.
4.
▲
by
D7x7w9pHnT
5y ago
Yes, that part is hacky. It's easy to write a short function to do the same thing explicitly but then you lose the concise charm
5.
▲
by
D7x7w9pHnT
5y ago
My favourite FizzBuzz is in Haskell, I found it in this talk by Kevlin Henney[0], and looks like this: fizzes = cycle ["", "", "Fizz"] buzzes = cycle ["", "", "", "&
6.
▲
by
D7x7w9pHnT
6y ago
This looks really cool! Especially the JSON benchmarks. Well done!