source-file? ( object -- ? ) (original) (raw)

source-file? ( object -- ? )

Vocabulary
source-files

Inputs and outputs

object an object
? a boolean

Word description
Tests if the object is an instance of the source-file class.

Definition

USING: classes.tuple.private kernel slots.private ;

IN: source-files

: source-file? ( object -- ? )
dup tuple?
[ layout-of 7 slot \ source-file eq? ] [ drop f ] if ;