computation
何らかの値を受け取って、そこから何らかの値を生み出すもの
紛らわしいのでcomputationと呼ぼう

日本語のArrow解説記事では「計算」と呼んでいるものが多い
Category cat a b
cat
によって、 a
を b
に変換する
computationであることの公理
以下の2つを満たす必要がある
恒等生
id . f == f . id == f
結合性
(f . g) . h = f . (g . h)
普通の関数 a -> b
cat
を (->)
にしたもの
型エイリアスにすると、 type Func a b = a -> b
「Kleisli arrow」などとも言う
cat
をモナド m
にしたもの
型エイリアスにすると、 type Kleisli m a b = a -> m b
非決定性 a -> [b]
1つの入力に対し、複数の返り値がある
返り値が一つに決まらないのが「非決定性」
type NonDet a b = a -> [b]
のような型
状態変換 (s,a) -> (s,b)
state transformers
s
は状態
集合と考えて良い
スタックマシンのスタックに積んでいる要素の集合とか

型エイリアスにすると、 type State s a b = (s, a) -> (s, b)
写像変換 (h -> a) -> (h -> b)
behaviour transformers
h
を何とみなすかによって色々解釈できる
ある時刻 t
における値を返す
ある場所 p
における値を返す
ある状態 s
における値を返す
型エイリアスにすると、 type MapTrans h b c = (h -> b) -> (h -> c)
「単純オートマン(simple automata)」って一般的な名詞なの?
具体的に何を指しているのかわかっていない

newtype Auto a b = A(a -> (b, Auto a b)
newtype Hyper b c = H (Hyper c b -> c)
stream transformers Stream b -> Stream c
わからん

Fudgets-style stream processors
data SP a b = Put b (SP a b) | Get (a -> SP a b)
わからん

参考
Examplesが載っている
各例に論文なども載っていて良い