Type aliases
⚠️ NOTE: type aliases aren't implemented yet
You can implement nominal type alises using the type
keyword:
type IntList = List<Int>
Type aliases can have type parameters as well:
type MyResult<a> = Result<a, MyError>
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
⚠️ NOTE: type aliases aren't implemented yet
You can implement nominal type alises using the type
keyword:
type IntList = List<Int>
Type aliases can have type parameters as well:
type MyResult<a> = Result<a, MyError>