Search Results
6/13/2025, 1:42:47 AM
>>105571385
>>105571550
I'm like 5 hours into the language itself so here's what I discovered
- f x y is implied as f(x,y) both forms are valid though the formatter flag must be supplied in order to convert to explicit brackets
- Str/List are namespace for standard library calls (see Elixir), additionally they are also literal types, the Result type is described as something that can be [Ok(v), Err(v)] much like Rust
- The namespace is determined by filename on import, e.g. if you want Util.fold you would create Util.roc (capitalised) and export the fold function
- White spaces matter which kind of sucks
Here's code from day 2 aoc 2024 that I did - with more strict formatter (roc format --migrate)
>>105571550
I'm like 5 hours into the language itself so here's what I discovered
- f x y is implied as f(x,y) both forms are valid though the formatter flag must be supplied in order to convert to explicit brackets
- Str/List are namespace for standard library calls (see Elixir), additionally they are also literal types, the Result type is described as something that can be [Ok(v), Err(v)] much like Rust
- The namespace is determined by filename on import, e.g. if you want Util.fold you would create Util.roc (capitalised) and export the fold function
- White spaces matter which kind of sucks
Here's code from day 2 aoc 2024 that I did - with more strict formatter (roc format --migrate)
Page 1