OK is a programming language created in 2021 by Jesse Duffield.
#1038on PLDB | 3Years Old |
git clone https://github.com/jesseduffield/OK
Welcome to the future of programming languages: OK?
let divide = fn(a, b) {
return switch b {
case 0: [NO!, "cannot divide by zero"];
default: [a / b, ""];
};
};
result = divide(5, 0)
switch result[1] {
case "": puts(result[0])
default: puts(result[1]) // prints "cannot divide by zero"
}