Replying to @kiyov09 @ThePrimeagen
Basically you're modifying the type, which can be used to prove some properties of it:
These numbers are what I remember from this James Hoffman video: youtu.be/etnMr8oUSDo?si=r2Y3…
34
Replying to @teej_dv
That album has so many good samples! Here's a great short documentary on the album, I bet you'd enjoy it! youtu.be/2ZXLyeatI0s?si=HlUf…
16
Pretty straightforward Advent of Code this evening! Part 2 seemed even easier than part 1 (especially when operating on linked lists)!
Something tells me this is going to be the last camel puzzle -- but it won't be last OCaml puzzle!
Advent of Code part 2 is trickier than it seems tonight! I'm gonna have to think about it. Luckily part 1 was pretty straightforward.
Happy haunting!
Finally, a camel themed Advent of Code problem!
Definitely a little bit of work for this one, but at least it didn't involve any brute forcing or fancy algorithms.
#AdventOfCode #OCaml
Ever wish OCaml had list comprehensions? Well, it kind of does!
The trick is to bind (let*) to List.concat_map.
Here's an example which generates a list of all (int * int * int)s which sum to 100:
Gotta be careful with TypeScript unions! In particular, the `in` keyword can lead to trouble.
One of the easiest ways to avoid this situation is to use a tagged union.
My contributions for this Thanksgiving:
* Egg Nog: youtu.be/sflZWeCjdco?si=gZtv…
* Mac and cheese: youtu.be/9iP1QXFWYkA?si=DF9N…
* Smoking Bishop: youtu.be/qJJvIbKo1DI?si=uxcW…
Thanks to @aragusea and @How2Drink for fattening up my family
2
101










