Skip to main content

Right hand side vs. Left hand side

What: Different sides to an operator e.g. = 
Why: Proper treatment of the sides of an operator e.g. = bring much functionality
Time To Complete: 23 hourhours 

.left and .right

In Free Form Programming Language (ff) the dot operator, namely simply the dot on your keyboard, allows for accessing parts of an expression!

Given an equation e.g. eq in the ff program below the lhs or x^2-1+y cab be accessed by the expression eq.left and a/b+c by the expression eq.right.

eq = (x^2-1+y == a/b+c);

lhs = eq.left;

show lhs;

rhs = eq.right;

show rhs;

save as lhsrhs

Output

"lhs" → -1 + x^2 + y

"rhs" → a/b + c