Class: Otherwise
Otherwise used as the default case in GuardBody
Example
ts
f x
| x == 2 = 16
| otherwise = x * 8Constructors
Constructor
new Otherwise(
loc?,metadata?):Otherwise
Parameters
| Parameter | Type |
|---|---|
loc? | SourceLocation |
metadata? | Metadata |
Returns
Otherwise
Inherited from
ASTNode.constructor
Methods
getMetadata()
getMetadata<
T>(key):T
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type |
|---|---|
key | string |
Returns
T
Inherited from
ASTNode.getMetadata
hasMetadata()
hasMetadata(
key):boolean
Parameters
| Parameter | Type |
|---|---|
key | string |
Returns
boolean
Inherited from
ASTNode.hasMetadata
setMetadata()
setMetadata(
key,value):void
Parameters
| Parameter | Type |
|---|---|
key | string |
value | any |
Returns
void
Inherited from
ASTNode.setMetadata