Factor Documentation
|
Home
|
Glossary
|
Search
factorcode.org
rational? ( object -- ? )
Vocabulary
math
Inputs and outputs
object
an
object
?
a boolean
Word description
Tests if the object is an instance of the
rational
class.
Definition
USING:
kernel
;
IN:
math
:
rational?
( object -- ? )
dup
ratio?
[
drop
t
]
[
integer?
]
if
;