For faster navigation, this Iframe is preloading the Wikiwand page for Тип-сумма.

Тип-сумма

Материал из Википедии — свободной энциклопедии

В другом языковом разделе есть более полная статья Sum type (англ.). Вы можете помочь проекту, расширив текущую статью с помощью перевода

Тип-сумма (англ. sum type; также Σ-тип, меченое объединение) — конструкция в языках программирования и интуиционистской теории типов, тип данных, построенный как дизъюнктное объединение исходных типов.

Наряду с типом-произведением является одной из важнейших форм алгебраического типа данных и одним из способов конструирования типов в интуиционистской теории типов и её вариантах. Перечисляемый тип может быть рассмотрен как вырожденная форма типа-суммы — размеченное объединение единичных типов (англ. unit types).

С точки зрения изоморфизма Карри — Ховарда, сопоставляющего типы данных и конструктивные математические доказательства, тип-сумма соответствует логической дизъюнкции.

Играют важную роль в языках семейства ML, таких как Standard ML, OCaml[1], Haskell[2] и других.

Примечания

[править | править код]
  1. 6.2 Sum types - CHAPTER 6. USER-DEFINED TYPES Архивная копия от 4 марта 2016 на Wayback Machine / Functional programming using Caml Light  (англ.): "A sum type is the finite labeled disjoint union of several types. A sum type definition defines a type as being the union of some other types."
  2. Gabriel Gonzalez, Sum Types Архивная копия от 12 августа 2015 на Wayback Machine / School of Haskell. To infinity and beyond. Pick of the Week  (англ.)


Для улучшения этой статьи желательно: Дополнить статью (статья слишком короткая либо содержит лишь словарное определение).Найти и оформить в виде сносок ссылки на независимые авторитетные источники, подтверждающие написанное.После исправления проблемы исключите её из списка. Удалите шаблон, если устранены все недостатки.
{{bottomLinkPreText}} {{bottomLinkText}}
Тип-сумма
Listen to this article

This browser is not supported by Wikiwand :(
Wikiwand requires a browser with modern capabilities in order to provide you with the best reading experience.
Please download and use one of the following browsers:

This article was just edited, click to reload
This article has been deleted on Wikipedia (Why?)

Back to homepage

Please click Add in the dialog above
Please click Allow in the top-left corner,
then click Install Now in the dialog
Please click Open in the download dialog,
then click Install
Please click the "Downloads" icon in the Safari toolbar, open the first download in the list,
then click Install
{{::$root.activation.text}}

Install Wikiwand

Install on Chrome Install on Firefox
Don't forget to rate us

Tell your friends about Wikiwand!

Gmail Facebook Twitter Link

Enjoying Wikiwand?

Tell your friends and spread the love:
Share on Gmail Share on Facebook Share on Twitter Share on Buffer

Our magic isn't perfect

You can help our automatic cover photo selection by reporting an unsuitable photo.

This photo is visually disturbing This photo is not a good choice

Thank you for helping!


Your input will affect cover photo selection, along with input from other users.

X

Get ready for Wikiwand 2.0 🎉! the new version arrives on September 1st! Don't want to wait?