Tuesday, July 10, 2018

[hivdeqyk] Adding apples and oranges

Declare Apple is_a Fruit. Declare Orange is_a Fruit.  1 * Apple + 2 * Orange = 3 * Fruit.  Without the is_a declarations, this would have failed with incompatible units.

Not sure what this would be useful for.

No comments:

Post a Comment