- タイトル
Erlang ユーザーガイドから始めよう
- バージョン
6.2
- 原文
- 原文の著作権者
Ericsson AB.
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 AssertionResult<'T> = | |
| NotAsserted of 'T | |
| Success | |
| Failure of string | |
// コンピュテーションビルダー | |
type TestBuilder() = | |
member self.Bind(x, f) = | |
match x with |
List
/\
a1 /\
a2 /\
a3 nil
foldr
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
# hgrc | |
[extensions] | |
mq = | |
hgshelve = $HOME/.mercurial/extensions/hgshelve/hgshelve.py | |
[alias] | |
# fix latest commit message | |
fix = ! hg shelve --all -n 'tmp.hg-fix' && hg qtop > NUL & if errorlevel 1 ( hg qimport -r . && hg qrefresh -m "$1" && hg qfinish -a ) else ( hg qrefresh -m "$1" ) && hg unshelve -n 'tmp.hg-fix' |
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
# hgrc | |
[extensions] | |
mq = | |
hgshelve = $HOME/.mercurial/extensions/hgshelve/hgshelve.py | |
[alias] | |
# fix latest commit message | |
fix = ! hg shelve --all -n 'tmp.hg-fix' && hg qtop > NUL & if errorlevel 1 ( hg qimport -r . && hg qrefresh -m "$1" && hg qfinish -a ) else ( hg qrefresh -m "$1" ) && hg unshelve -n 'tmp.hg-fix' |
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
# hgrc | |
[extensions] | |
mq = | |
hgshelve = $HOME/.mercurial/extensions/hgshelve/hgshelve.py | |
[alias] | |
# fix latest commit message (hg 1.8.x only) | |
fix = ! \ | |
$HG shelve --all -n 'tmp.hg-fix' && \ |
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
# hgrc | |
# if you use some Unix base operating systems, like Linux distributions, BSDs or Macs, | |
# see: https://gist.github.com/1187980 | |
[extensions] | |
mq = | |
hgshelve = $HOME/.mercurial/extensions/hgshelve/hgshelve.py | |
[alias] | |
# fix latest commit message |
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
# -*- coding: utf-8 -*- | |
import random | |
import datetime | |
left_brows = ['´', '`', ''] | |
left_eyes = ['・', '^', ';', '>', ''] | |
mouths = ['ω', '∀', 'ρ', '_', 'Д', 'д', ''] | |
right_eyes = ['・', '^', ';', '<', ''] | |
right_brows = ['´', '`', ''] |
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
# hgrc | |
# hg-now is the simple alias inspired by git-now. | |
# (http://d.hatena.ne.jp/sinsoku/20101208/1291770514) | |
# and it is for Windows environments. | |
# if you use some Unix base operating systems, like Linux distributions, BSDs or Macs, | |
# please hack it in your environment. | |
[alias] | |
# create a temporary commit. | |
now = ! hg commit -m "[from now] %date% %time%" |
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
function write(message) { | |
document.getElementById("output").innerHTML += message + "<br />"; | |
} | |
function assertEquals(expected, actual) { | |
if (expected == actual) { | |
write("OK"); | |
} else { | |
var text = "expected = [" + expected.toString() | |
+ "], but actual = [" + actual.toString() + "]." |