Skip to content

Latest commit

 

History

History
60 lines (37 loc) · 853 Bytes

File metadata and controls

60 lines (37 loc) · 853 Bytes

None! datatype

1. Abstract

None represents "no useful value" or "no result". It’s used as a sentinel/placeholder/dummy value, for three-valued logic, and as a function result to indicate failure.

None! is a member of the following typesets: immediate!

2. Creation

None values can be created using literal syntax, or at runtime using a make constructor, or a to conversion.

>> make none! 'x
== none

>> to none! 42
== none

3. Literal syntax

The predefined word none or the serialized syntax:

#(none)

4. Testing values

Use none? to check if a value is of the none! datatype.

>> none? 1
== false

>> none? true
== false

>> none? none
== true

Use type? to return the datatype of a given value.

>> type? none
== none!

5. Predefined words

5.1. Functions

to-none