Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does '((->) a)' mean?

I've seen this type before without knowing what it means. Does it mean something and/or does it have a name?

Prelude> :m Data.Functor
Prelude Data.Functor> :t flip . (flip (<$>))
flip . (flip (<$>))
:: Functor ((->) b) => (b -> a) -> b -> (a -> c) -> c
like image 508
Carlos López-Camey Avatar asked Dec 17 '12 00:12

Carlos López-Camey


People also ask

What does this symbol mean ∉?

(vii) The symbol '∉' stands for 'does not belongs to' also for 'is not an element of'. Therefore, x ∉ A will read as 'x does not belongs to set A' or 'x is not an element of the set A'.

What does ⊆ mean in math?

In set theory, a subset is denoted by the symbol ⊆ and read as 'is a subset of'. Using this symbol we can express subsets as follows: A ⊆ B; which means Set A is a subset of Set B. Note: A subset can be equal to the set. That is, a subset can contain all the elements that are present in the set.

What does :'( mean in text?

:'( means "Crying" or "Sad." This icon is typically used after receiving sad news. When typed, the colon represents eyes, the apostrophe represents a tear, and the open-bracket represents a sad mouth.

What does ⊂ mean in math?

The symbol "⊂" means "is a proper subset of". Example. Since all of the members of set A are members of set D, A is a subset of D. Symbolically this is represented as A ⊆ D. Note that A ⊆ D implies that n(A) ≤ n(D) (i.e. 3 ≤ 6).


1 Answers

Actually, ((->) a) is not a type but a partially applied type constructor.

Just like functions, type constructors can be partially applied in Haskell.

You can check the kind of something in GHCi:

ghci> :k (->)
(->) :: * -> * -> *

ghci> :k (->) Int
(->) Int :: * -> *

All values have types of kind *; type constructors have kinds like * -> *, * -> * -> *, etc.

like image 138
Matt Fenwick Avatar answered Sep 22 '22 09:09

Matt Fenwick