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
| class Color(prefix: String) { | |
| def apply(text: String): String = { | |
| prefix + text | |
| } | |
| } | |
| object Color { | |
| val RED = new Color("&c") | |
| val BLUE = new Color("&1") |
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
| getAppend :: String -> IO String | |
| getAppend x = getLine >>= return . (++ x) | |
| main :: IO () | |
| main = getAppend " World!" >>= putStrLn |
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
| struct Foo<'a> { | |
| a: String, | |
| b: &'a str, | |
| } | |
| impl<'a> Foo<'a> { | |
| fn new() -> Foo<'a> { | |
| Foo { a: String::new(), b: "" } | |
| } | |
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
| #![feature(io)] | |
| use std::net::{TcpStream}; | |
| use std::io::{BufRead, BufReader, Write, stdout}; | |
| //mod parser; | |
| fn main() { | |
| let name = "irc.freenode.net:6667"; |
NewerOlder