Created
July 29, 2014 14:06
-
-
Save MatejLach/6c9358f66b8068081f1b to your computer and use it in GitHub Desktop.
if/else Rust example...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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