English |
日本語 |
|
type constructor |
|
data Maybe a = Nothing | Just a
|
data constructor |
|
a = Just 123
b = Nothing
|
algebraic data type |
|
data Tree a
= EmptyTree
| Leaf a
| Node (Tree a) (Tree a)
|
type class |
|
class Monad m where
(>>=) :: m a -> (a -> m b) -> m b
(>>) :: m a -> m b -> m b
return :: a -> m a
fail :: String -> m a
|
type (parameter|variable) |
|
head :: [a] -> a
|
curried function |
|
min :: Ord a => a -> a -> a
|
partial application |
|
>>> let limitPoint = min 100
>>> limitPoint 101
100
|
higher-order function |
|
map :: (a -> b) -> [a] -> [b]
map _ [] = []
map f (x:xs) = f x : map f xs
|