英語の品詞各種(from wikipedia - 品詞 - 英語の品詞)
- 名詞 (noun)
- 代名詞 (pronoun)
- 動詞 (verb)
- 助動詞 (modal verbs)
| {-# LANGUAGE TemplateHaskell, FlexibleContexts, FlexibleInstances, UndecidableInstances, OverlappingInstances #-} | |
| import Control.Lens | |
| import Control.Monad.State | |
| -- 基本となるオブジェクト | |
| data Obj = Obj { | |
| _pos :: Int | |
| } deriving (Show) | |
| -- Obj型のオブジェクトをもつ抽象的なクラスHasObjを作る |
| {-# LANGUAGE GADTs, RankNTypes, MultiParamTypeClasses, FlexibleInstances #-} | |
| module End where | |
| import qualified Prelude | |
| import Control.Category | |
| import Data.Monoid | |
| import Data.Functor.Identity | |
| type Hask = (->) |
| {-# LANGUAGE GADTs #-} | |
| import Control.Monad | |
| import Control.Monad.Operational.Simple | |
| data Simple a where | |
| End :: Simple a | |
| Put :: String -> Simple () | |
| Get :: Int -> Simple String | |
| put :: String -> Program Simple () |
| {-# LANGUAGE DeriveFunctor, TypeOperators #-} | |
| import Prelude hiding (True, False, init, id) | |
| import Control.Category | |
| import Control.Arrow | |
| import Control.Monad.Free | |
| newtype Atom a b = Atom { runAtom :: a -> b } | |
| data Formula a b = True |
| import Control.Monad.Free | |
| -- data Maybe a = Nothing | Just a | |
| data Simple a next = End next | Data a next | Skip a next | |
| deriving (Show) | |
| instance Functor (Simple a) where | |
| fmap f (End next) = End (f next) | |
| fmap f (Data a next) = Data a (f next) | |
| fmap f (Skip a next) = Skip a (f next) |
| import Data.Char | |
| import Data.List | |
| import Data.Array | |
| import System.Environment (getArgs) | |
| type Board = Array (Int,Int) Int | |
| type BFilter = Array (Int,Int) [Int] | |
| width = 9 | |
| toLine :: String -> [Int] |
- 名詞 (noun)
- 代名詞 (pronoun)
- 動詞 (verb)
| module Main where | |
| -- http://www.f13g.com/%A5%D7%A5%ED%A5%B0%A5%E9%A5%DF%A5%F3%A5%B0/Haskell/GLUT/#content_1_4 | |
| import Graphics.Gloss | |
| import Graphics.Gloss.Interface.Pure.Game | |
| data State | |
| = State { angle :: Float | |
| , isPositive :: Bool |
| \abf.fab | |
| = \abf.(I f)(K (ab)f) | |
| = \ab.SI(K(ab)) | |
| = \ab.(K(SI)(ab))(K(ab)) | |
| = \ab.S(K(SI))K(ab) | |
| = \ab.(K(S(K(SI))K) b)(a b) | |
| = \ab.S(K(S(K(SI))K))ab | |
| = S(K(S(K(SI))K)) | |
| inc := \nfx.f(nfx) | |
| inc | |
| = \xyz.y(xyz) | |
| = \xyz.(Ky z)(xy z) | |
| = \xyz.S(Ky)(xy)z | |
| = \xy.S(Ky)(xy) | |
| = \xy.((KSy)(Ky))(xy) | |
| = \xy.(S(KS)Ky)(xy) | |
| = \xy.S(S(KS)K)xy |