This file contains 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
#Sample code | |
#Hello world | |
"Hello world!" print | |
#Factorial | |
factorial := method(n, if(n == 1, 1, n * factorial(n - 1))) | |
99 bottles of beer |
This file contains 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
(ns typed.core | |
(:require [clojure.core.typed :as t])) | |
(t/ann-datatype Foo [fooName :- t/Str]) | |
(deftype Foo [fooName]) | |
(t/ann-datatype Bar [barName :- t/Str]) | |
(deftype Bar [barName]) | |
(t/ann theName [(t/U Foo Bar) -> t/Str]) |
This file contains 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/bash | |
# Script for installing tmux on systems where you don't have root access. | |
# tmux will be installed in $HOME/local/bin. | |
# It's assumed that wget and a C/C++ compiler are installed. | |
# exit on error | |
set -e | |
TMUX_VERSION=1.8 |
This file contains 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
1.2 Motivation, second sentence: "This is idea not new" | |
page 18: "singleton types in ATTT a much more advanced" | |
page 21: "We now have sufficient information to synthesise the type of listing 2.2 to be (List Float)". | |
Should that be "... to be (LazySeq Float)"? | |
page 22: "Colored Local Type Inference is a candidate for" | |
Should there be more here, or is that leading into 2.9? |
This file contains 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
(ns sudoku | |
(:refer-clojure :exclude [==]) | |
(:use clojure.core.logic)) | |
(defn get-square [rows x y] | |
(for [x (range x (+ x 3)) | |
y (range y (+ y 3))] | |
(get-in rows [x y]))) | |
(defn init [vars hints] |