Documentation
Guides and reference for CP Lang 0.3 (beta).
CP Lang is in beta. Every example on this site carries a badge set by the compiler: runs means it runs today, checks means the checker accepts it but it doesn't run yet, and 0.3 spec means it is written to the spec and the compiler doesn't accept it yet.
Getting started
Install cpl, run programs and emit C++17.
Tour
The language in one page.
Indices and domains
Index spaces that can't be mixed up.
Coming from C++
The C++ habits that change, and why.
let n: 1..=2e5 = read()
domain V = 1..=n
let a: [V]Int = read()
print(a.sum())