12 lines
229 B
Text
12 lines
229 B
Text
fmod ADD is
|
|
|
|
protecting INT .
|
|
|
|
op undefined : -> Int .
|
|
op _add_ : Int Int -> Int [assoc comm] .
|
|
|
|
vars A B : Int .
|
|
|
|
eq A add B = if (A < -1000 or B < -1000) or (A > 1000 or B > 1000) then undefined else A + B fi .
|
|
|
|
endfm
|