Headline

A type that contains type parameters

Illustration

Let's use Language:Haskell here for illustration here. Consider this type:

(b -> c) -> (a -> b) -> a -> c

This type contains three type parameters: a, b, and c. In fact, this is the type of function composition, which indeed is a polymorphic function. We can look at the function signature of function composition like this:

> :t (.)
(.) :: (b -> c) -> (a -> b) -> a -> c

(For what it matters, "." is a higher-order function).

Here are further examples of polymorphic types, again in the type system of Language:Haskell:

  • Maybe a: a Maybe type
  • Either a b: an Either type
  • f a: a higher-kinded polymorphic type, as f is a type-constructor position


There are no revisions for this page.

User contributions

    This user never has never made submissions.

    User edits

    Syntax for editing wiki

    For you are available next options:

    will make text bold.

    will make text italic.

    will make text underlined.

    will make text striked.

    will allow you to paste code headline into the page.

    will allow you to link into the page.

    will allow you to paste code with syntax highlight into the page. You will need to define used programming language.

    will allow you to paste image into the page.

    is list with bullets.

    is list with numbers.

    will allow your to insert slideshare presentation into the page. You need to copy link to presentation and insert it as parameter in this tag.

    will allow your to insert youtube video into the page. You need to copy link to youtube page with video and insert it as parameter in this tag.

    will allow your to insert code snippets from @worker.

    Syntax for editing wiki

    For you are available next options:

    will make text bold.

    will make text italic.

    will make text underlined.

    will make text striked.

    will allow you to paste code headline into the page.

    will allow you to link into the page.

    will allow you to paste code with syntax highlight into the page. You will need to define used programming language.

    will allow you to paste image into the page.

    is list with bullets.

    is list with numbers.

    will allow your to insert slideshare presentation into the page. You need to copy link to presentation and insert it as parameter in this tag.

    will allow your to insert youtube video into the page. You need to copy link to youtube page with video and insert it as parameter in this tag.

    will allow your to insert code snippets from @worker.