firstname.lastname@example.org email@example.com g@
Email! values allow for directly expressing email addresses, e.g.
Email! is a member of the following typesets:
Email values can be created using literal syntax, or at runtime using a
make constructor or a
3. Literal syntax
One or more characters, followed by the
@ symbol, followed by zero or more additional characters.
4. Runtime creation
>> f: make email! "foo" == foo >> type? f == email!
>> b: to email! 'bar == bar >> type? b == email!
5. Path accessors
Path accessors provide a convenient way for getting or setting the user name or host name of an email value.
>> e: firstname.lastname@example.org == email@example.com >> e/user == "me" >> e/user: "you" == "you" >> e == firstname.lastname@example.org
>> e/host == "me.net" >> e/host: "red-lang.org" == "red-lang.org" >> e == email@example.com
All comparators can be applied on
=, ==, <>, >, <, >=, <=, =?. In addition,
max are also supported.
7. Testing values
email? to check if a value is of the
>> email? firstname.lastname@example.org == true
type? to return the datatype of a given value.
>> type? email@example.com == email!
8. Predefined words