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
enum List { | |
Nil, | |
Node(int, ~List) | |
} | |
fn walk(l: &List) -> ~str { | |
match *l { | |
Node(i, ref rest) => fmt!("%d %s", i, walk(*rest)), | |
Nil => ~"end" | |
} |
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
trait Fruit { | |
fn eat(&self); | |
} | |
struct Apple { | |
x: int | |
} | |
impl Fruit for Apple { | |
fn eat(&self) { |
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
\set ON_ERROR_STOP | |
CREATE TABLE Sites ( | |
id SERIAL PRIMARY KEY, | |
base_url VARCHAR NOT NULL, | |
title VARCHAR NOT NULL, | |
public_read BOOLEAN NOT NULL DEFAULT FALSE, | |
allow_anyone BOOLEAN NOT NULL DEFAULT FALSE, | |
allow_unverified BOOLEAN NOT NULL DEFAULT FALSE, |
OlderNewer