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
interface IGreeter { | |
greet(): string; | |
} | |
class NameGreeter implements IGreeter { | |
constructor(public name: string) {} | |
public greet(): string {return this.name} | |
} | |
class CountGreeter implements IGreeter { | |
private count: number = 0; | |
public greet(): string {return this.count++ + "th";} |
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
git diff --stat HEAD^ | awk '/¥|/ {print ¥1}' | xarg cp --parents -t ./HOGEDIR |
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
type expression = | |
| Const of float | |
| Var of string | |
| Sum of expression * expression | |
| Diff of expression * expression | |
| Prod of expression * expression | |
| Quot of expression * expression;; | |
exception Unbound_variable of string;; |
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
module type PRIOQUEUE = | |
sig | |
type priority = int | |
type 'a queue | |
val empty : 'a queue | |
val insert : 'a queue -> int -> 'a -> 'a queue | |
val extract : 'a queue -> int * 'a * 'a queue | |
exception Queue_is_empty | |
end;; |
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
type comparison = Less | Equal | Greater;; | |
module type ORDERED_TYPE = | |
sig | |
type t | |
val compare: t -> t -> comparison | |
end;; | |
module Set = | |
functor (Elt: ORDERED_TYPE) -> |
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
type info = string | |
type term = | |
| TmTrue | |
| TmFalse | |
| TmIf of term * term * term | |
| TmZero | |
| TmSucc of term | |
| TmPred of term | |
| TmIsZero of term |
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
The following actions will be performed: | |
- install spotinstall.1.1.0 | |
1 to install | 0 to reinstall | 0 to upgrade | 0 to downgrade | 0 to remove | |
=-=-= Installing spotinstall.1.1.0 =-=-= | |
The archive for spotinstall.1.1.0 is in the local cache. | |
Extracting /home/cohama/.opam/archives/spotinstall.1.1.0+opam.tar.gz. | |
Building spotinstall.1.1.0: | |
ocaml setup.ml -configure --prefix /home/cohama/.opam/4.00.1+annot | |
ocaml setup.ml -build |
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
if has('vim_starting') | |
set runtimepath+=~/tmp/bundle/neobundle.vim/ | |
endif | |
call neobundle#rc(expand('~/tmp/bundle/')) | |
NeoBundleLazy 'Shougo/vimfiler', { | |
\ 'autoload' : { | |
\ 'commands' : ['VimFiler'], | |
\ }} |
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
let s:V = vital#of('vital') | |
let s:S = s:V.import('Data.String') | |
let start = reltime() | |
let test1 = s:S.substitute_last(repeat('vim is vital', 1000), 'i', 'ooo') | |
let elapsed = reltimestr(reltime(start)) | |
echo "substitute last" elapsed | |
let start = reltime() | |
let test2 = substitute(repeat('vim is vital', 1000), 'i', 'ooo', '') | |
let elapsed = reltimestr(reltime(start)) |
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
(* Utilities *) | |
let (|>) x f = f x | |
let (|-) f g = fun x -> g (f x) | |
let getOrElse defVal = function | |
| Some(v) -> v | |
| None -> defVal | |
(* Term Definition *) | |
type term = | |
| TmVar of int * int (* 変数 : deBruijn_index * term_length *) |
OlderNewer