あどけない話

Internet technologies

2010-10-29から1日間の記事一覧

Living in the open world(2)

以下は Alice が定義: {-# LANGUAGE TypeSynonymInstances #-} module A where type StackA = [] top :: StackA a -> a top = head pop :: StackA a -> StackA a pop = tail push :: a -> StackA a -> StackA a push = (:) move :: StackA a -> c a -> (a -…