Skip to content

Instantly share code, notes, and snippets.

@MatejLach
Created July 29, 2014 14:06
Show Gist options
  • Save MatejLach/6c9358f66b8068081f1b to your computer and use it in GitHub Desktop.
Save MatejLach/6c9358f66b8068081f1b to your computer and use it in GitHub Desktop.
if/else Rust example...
fn main() {
let lang = "Rust";
if lang == "Rust" {
println!("The next-gen systems programming language!");
} else if lang == "Haskell" {
println!("A high-level, purely functional programming language.");
} else if lang == "Elixir" {
println!("Another aspiring, functional language.");
} else {
println!("Probably not an interesting language :-)");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment