I think @Georges Boris mentioned that it took a while to find the name of a builtin function to do something you have in mind.
It might be good to keep track of functions commonly used for advent of code, so we can list them in a document, perhaps with minimal examples as well.
A general AdventOfCode.md with tips would probably be valuable as well.
Something like https://aplcart.info/ might be useful, even if just a static list for now. Otherwise, maybe a list of common other names for functions would be useful (i think we have a partial list like this). Also, we probably should promote roc-lang.org/builtins/List more. Probably should make the link work directly instead of making it a requirement to go to a specific module.
@Anton yup! both List.walk and List.len - it was easy finding them but the short name for length tricked me a bit and I've never seen "walk" used before as foldl/reduce but I could sort of guess.
Another piece of this that would be nice is searching for specific functionality. Popular languages have the power of Google on their side, but things like Hoogle help too. For instance, I was trying to find if any of the Str -> Num
functions have the option of taking a radix
param to parse a binary string representation to a decimal integer. e.g. elixirs String.to_integer(n, 2)
. I couldn't find one, but correct me if I'm wrong.
We have a docs site?! If I knew this before, I forgot it. We should link it somewhere...
It's linked in the github README under "some docs for the standard library", which is where I found it.
Oh, awesome, my bad
I've made a PR to make the docs link stand out more.
Last updated: Jul 06 2025 at 12:14 UTC