Skip to content

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 + y

Constructors

Constructor

new Equation(patterns, body, returnExpr?, loc?): Equation

Parameters

ParameterType
patternsPattern[]
bodyUnguardedBody | GuardedBody[]
returnExpr?Return
loc?SourceLocation

Returns

Equation

Overrides

ASTNode.constructor