Class: Equation
Represents one Equation with its arguments and body. Allows for overloading and pattern matching. You may define the return statement to access it more easily.
Example
ts
add 0 y = y
add x y = x + yConstructors
Constructor
new Equation(
patterns,body,returnExpr?,loc?):Equation
Parameters
| Parameter | Type |
|---|---|
patterns | Pattern[] |
body | UnguardedBody | GuardedBody[] |
returnExpr? | Return |
loc? | SourceLocation |
Returns
Equation
Overrides
ASTNode.constructor