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
default: all | |
all: compile test | |
compile: | |
cs3110 compile -t -p core -p async main.ml | |
cs3110 compile -t -p core -p async main_test.ml | |
test: compile | |
cs3110 test main_test.ml |
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
all: main_ounit.byte main_qcheck.byte main_pa_ounit.byte | |
main_ounit.byte: main_ounit.ml | |
corebuild -pkg oUnit main_ounit.byte | |
main_pa_ounit.byte: main_pa_ounit.ml | |
corebuild -pkg oUnit,pa_ounit,pa_ounit.syntax main_pa_ounit.byte | |
main_qcheck.byte: main_qcheck.ml | |
corebuild -pkg qcheck main_qcheck.byte |
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
\DefineNamedColor{named}{mongobrown}{RGB}{61, 41, 30} | |
\DefineNamedColor{named}{mongogold} {RGB}{129, 102, 75} | |
\DefineNamedColor{named}{mongogreen}{RGB}{55, 140, 40} | |
\DefineNamedColor{named}{darkgray}{cmyk}{0,0,0,0.90} | |
\mode<presentation> | |
\setbeamercolor{alerted text}{fg=red} | |
\setbeamercolor*{palette primary}{bg=mongobrown,fg=white} | |
\setbeamercolor*{palette secondary}{fg=white,bg=mongogreen} | |
\setbeamercolor*{palette tertiary}{fg=white,bg=darkgray} |
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(macro_rules)] | |
macro_rules! map( | |
() => ({}); | |
($a:expr) => ($a); | |
($a:expr -> $b:expr) => ($a.map($b)); | |
($a:expr -> $b:expr -> $($c:expr)->*) => (map!($a.map($b) -> $($c)->*)); | |
) | |
macro_rules! flatbind( |
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
package main | |
import ( | |
"fmt" | |
"net" | |
"os" | |
"time" | |
) | |
const ( |
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
// Option bind for rust 0.10 | |
fn inv(f: f32) -> Option<f32> { | |
if f == 0.0 { | |
None | |
} | |
else { | |
Some(1.0 / f) | |
} | |
} |
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
#include <iostream> | |
#include <vector> | |
template<typename F> | |
int operator>>=(int i, F f) { | |
if (i == 0) { | |
return i; | |
} | |
return f(i); | |
} |
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
#! /bin/sh | |
usage() { | |
echo "usage:" | |
echo " gitdown <markdown file>" | |
} | |
if test $# -lt 1; then | |
usage; | |
exit; |
NewerOlder