Computer Science/프로그래밍언어

Wiki | Unit type

토마토. 2022. 4. 3. 12:44

unit type is a type that allows only one value (and thus can hold no information

 

It is customary to talk about the unit type and ignore the details of its value. One may also regard the unit type as the type of 0-tuple

 

The unit type is implemented in most functional programming languages. 

 

cf) In ML descendants (including OCamlStandard ML, and F#), the type is called but the value is written as .unit()

 

void, null이랑 비슷한 개념인 것 같음