Join Exercism’s Roc Track for access to 120 exercises with automatic analysis of your code and personal mentoring, all 100% free.
print_remaining! = |todos|
todos
.keep_if(|todo| todo.status != Done)
.for_each!(|todo| echo!("- ${todo.name}\n"))
main! = |_args| {
todos = [
{ name: "Buy groceries", status: Done },
{ name: "Join Exercism", status: Done },
{ name: "Learn Roc", status: InProgress },
{ name: "Call mom", status: NotStarted },
]
print_remaining!(todos)
Ok({})
}
Get better at programming through fun, rewarding coding exercises that test your understanding of concepts with Exercism.
Given a number determine whether or not it is valid per the Luhn formula.
Given a DNA string, compute how many times each nucleotide occurs in the string.
Given a diagram, determine which plants each child in the kindergarten class is responsible for.
Roc code is designed to build fast and run fast. It compiles to machine code or WebAssembly.
Roc has a small number of simple language primitives. It's a single-paradigm functional language.
Roc's syntax, semantics, and included toolset all prioritize user-friendliness.
Roc's powerful type system and immutability lead to more predictable and maintainable code.
Roc works well with other languages, making it easier to integrate into existing projects.
Roc is a young language, and it is evolving fast.
Every language has its own way of doing things. Roc is no different. Our mentors will help you learn to think like a Roc developer and how to write idiomatic code in Roc. Once you've solved an exercise, submit it to our volunteer team, and they'll give you hints, ideas, and feedback on how to make it feel more like what you'd normally see in Roc - they'll help you discover the things you don't know that you don't know.
Learn more about mentoringThe Roc track on Exercism has 120 exercises to help you write better code.
See all Roc exercises