Handbook
Glossary
callable
Factor handbook
»
The language
»
Collections
»
Quotations
Prev:
quotation? ( object -- ? )
Next:
Wrappers
Vocabulary
quotations
Class description
The mixin class of objects which can be called. Built-in instances include words, quotations, and compositions built with
curry
or
compose
. Words execute when called, and remain ordinary word objects rather than sequences.
Definition
USING:
words
;
IN:
quotations
MIXIN:
callable
INSTANCE:
quotation-like
callable
INSTANCE:
word
callable
Methods
USING:
compiler.tree.builder.private
quotations
stack-checker.backend
;
M:
callable
(build-tree)
infer-quot-here
;
USING:
prettyprint.custom
quotations
;
M:
callable
>pprint-sequence
;
USING:
arrays
compiler.cfg.intrinsics.simd.backend
generalizations
kernel
make
quotations
;
M::
callable
>vector-op-cond
( quot #pick #dup -- quotpair )
#dup quot
[vector-op-checked]
'[
2drop
@
]
#dup
'[
%
_
nnip
]
2array
;
USING:
combinators
html.templates
quotations
;
M:
callable
call-template*
( -- )
call-effect
;
USING:
combinators.private
compiler.tree.propagation.call-effect
quotations
;
M:
callable
check-call-effect
check-known-call-effect
;
USING:
compiler.units
kernel
quotations
stack-checker
tools.disassembler
words
;
M:
callable
disassemble
[
dup
infer
define-temp
]
with-compilation-unit
disassemble
;
USING:
combinators
quiz
quotations
;
M:
callable
generate-question*
( -- quot )
call-effect
;
USING:
kernel
namespaces
quotations
stack-checker.backend
stack-checker.branches
stack-checker.visitor
;
M:
callable
infer-branch
[
copy-inference
nest-visitor
[
[
quotation
set
]
[
infer-quot-here
]
bi
]
infer-branch-effect
collect-variables
]
with-scope
;
USING:
compiler.tree.builder
compiler.tree.debugger
compiler.tree.optimizer
namespaces
prettyprint
prettyprint.config
quotations
;
M:
callable
optimized.
build-tree
optimize-tree
nodes>quot
f
length-limit
[
.
]
with-variable
;
USING:
kernel
present
quotations
sequences
splitting
;
M:
callable
present
[
"[ ]"
]
[
[
drop
"[ "
]
[
[
present
]
map
join-words
]
[
drop
" ]"
]
tri
3append
]
if-empty
;
USING:
quotations
tools.crossref.private
;
M:
callable
quot-uses
seq-uses
;
USING:
combinators
destructors
io
io.pipes.private
kernel
quotations
;
M:
callable
run-pipeline-element
[
[
[
dup
[
&dispose
drop
]
when*
]
bi@
]
dip
[
[
?reader
]
[
?writer
]
bi*
]
dip
'[
_
( -- result )
call-effect
]
with-streams*
]
with-destructors
;
USING:
compiler.tree.propagation.inlining
quotations
;
M:
callable
splicing-nodes
splicing-body
;
USING:
effects
quotations
stack-checker
;
M:
callable
stack-effect
infer
;
USING:
compiler.cfg.builder
compiler.cfg.debugger
quotations
words
;
M:
callable
test-builder
build-optimized-tree
gensym
build-cfg
;
USING:
hash-sets.identity
kernel
namespaces
quotations
sets
tools.crossref
tools.crossref.private
;
M:
callable
uses
IHS{
}
clone
visited
[
HS{
}
clone
[
quot-uses
]
keep
members
]
with-variable
;
USING:
alien.private
kernel
namespaces
quotations
sequences
stack-checker.alien
;
M:
callable
wrap-callback-quot
>quotation
swap
[
[
callback-parameter-quot
]
[
callback-return-quot
]
bi
surround
]
[
callback-va-scope?
]
bi
[
"with-va-scope"
va-reader-word
'[
_
@
]
]
when
wait-for-callback-hook
get
'[
_
_
do-callback
]
>quotation
;