array - Factor Documentation (original) (raw)
Class description
The class of fixed-length arrays. See Array syntax for syntax and Arrays for general information.
M: array ($instance) print-element ;
USING: arrays continuations io.sockets.private sequences ;
M: array (client) [ (client) 3array ] attempt-all first3 ;
USING: arrays functors.private make sequences ;
M: array (fake-quotations>)
[ [ (fake-quotations>) ] each ] { } make , ;
USING: arrays gml.types kernel ;
USING: arrays fjsc kernel sequences ;
M: array (parse-factor-quotation)
[ (parse-factor-quotation) ] { } map-as ast-array boa ;
USING: arrays serialize serialize.private ;
M: array (serialize) 97 serialize-seq ;
USING: arrays farkup sequences ;
M: array (write-farkup) [ (write-farkup) ] map ;
USING: arrays kernel monads sequences ;
M: array >>= [ swap map concat ] curry ;
M: array >ber 48 >ber-seq-internal ;
USING: arrays functors.private sequences ;
M: array >fake-quotations [ >fake-quotations ] { } map-as ;
USING: arrays io.servers.private sequences ;
M: array >insecure [ >insecure ] map concat ;
USING: arrays ui.gadgets.labels ;
USING: arrays python sequences ;
M: array >py [ >py ] map array>py-tuple ;
USING: arrays sequences tools.continuations ;
M: array add-breakpoint [ add-breakpoint ] map ;
USING: arrays sequences stack-checker.dependencies words ;
M: array add-depends-on-c-type
[ word? ] filter [ +definition+ depends-on ] each ;
USING: arrays sequences tools.scaffold.private ;
M: array add-using [ add-using ] each ;
USING: arrays sequences smalltalk.printer splitting ;
M: array array-element>string
[ array-element>string ] map join-words "(" ")" surround ;
USING: arrays sequences smalltalk.compiler.assignment ;
M: array assigned-locals [ assigned-locals ] map concat ;
USING: alien.c-types arrays kernel ;
M: array base-type drop void* base-type ;
USING: alien.c-types arrays sequences ;
M: array c-type-align first c-type-align ;
USING: alien.c-types arrays sequences ;
M: array c-type-align-first first c-type-align-first ;
USING: alien.c-types arrays kernel ;
M: array c-type-boxed-class drop object ;
USING: alien.arrays alien.c-types alien.data arrays kernel
sequences ;
M: array c-type-boxer-quot
unclip [ array-length ] dip [ ] 2curry ;
USING: alien.c-types arrays kernel ;
M: array c-type-class drop object ;
USING: alien.c-types arrays kernel sequences ;
M: array c-type-string
unclip
[ [ c-type-string "[" "]" surround ] map ] [ c-type-string ]
bi* prefix concat ;
USING: alien alien.c-types arrays kernel ;
M: array c-type-unboxer-quot drop [ >c-ptr ] ;
M: array clone (clone) ; inline
USING: arrays generic kernel sequences sequences.generalizations
smalltalk.compiler ;
M: array compile-ast
dup contains-blocks? [
[ [ compile-ast ] with map [ ] join ] [ length ] bi
[ narray ] curry compose
] [ M\ array compile-ast (call-next-method) ] if ;
USING: arrays macros.expander sequences ;
M: array condomize [ condomize ] map ;
USING: arrays macros.expander sequences ;
M: array condomize? [ condomize? ] any? ;
USING: arrays sequences smalltalk.compiler ;
M: array contains-blocks? [ contains-blocks? ] any? ;
USING: arrays kernel opengl opengl.gl sequences ui.text
ui.text.private ;
M: array draw-text
[
[
[ draw-string ]
[ [ 0.0 ] 2dip string-height 0.0 glTranslated ] 2bi
] with each
] do-matrix ;
USING: arrays help.markup kernel make sequences ;
M: array elements*
[
dup first \ $markup-example eq?
[ 2drop ] [ [ elements* ] with each ] if
] [ [ first eq? ] 1check [ , ] [ drop ] if ] 2bi ;
USING: arrays kernel sequences ;
M: array equal? over array? [ sequence= ] [ 2drop f ] if ;
USING: arrays sequences ui.gadgets ;
M: array gadget-text* [ gadget-text* ] each ;
USING: arrays compiler.cfg.gvn sequences ;
USING: arrays kernel math sequences ;
M: array hashcode* [ sequence-hashcode ] recursive-hashcode ;
USING: alien.arrays alien.c-types arrays kernel math sequences ;
M: array heap-size unclip [ array-length ] [ heap-size ] bi* * ;
USING: arrays math.order sorting.quick ;
M: array inv-sort! [ <=> ] inv-sort-with! ;
USING: arrays sequences xml-rpc xml.data xml.syntax.private ;
M: array item>xml
[
item>xml 1 nenum T{ xml-chunk
{ seq
V{
""
T{ tag
{ name ~name~ }
{ children ~vector~ }
}
""
}
}
} interpolate-xml
] map 1 nenum T{ xml-chunk
{ seq
V{
""
T{ tag { name ~name~ } { children ~vector~ } }
""
}
}
} interpolate-xml ;
USING: arrays kernel sequences ui.traverse ;
M: array leaves* [ leaves* ] curry each ;
USING: accessors arrays sequences ;
M: array length length>> ; inline
USING: accessors arrays kernel sequences vectors ;
M: array like
drop dup array? [
dup vector? [
[ length ] [ underlying>> ] bi 2dup length eq?
[ nip ] [ resize-array ] if
] [ >array ] if
] unless ; inline
USING: arrays kernel sequences slots ;
M: array make-slot
swap peel-off-name peel-off-class
[ dup empty? ] [ peel-off-attributes ] until drop
check-initial-value ;
M: array monad-of drop array-monad ;
USING: arrays binary-search kernel math.order ;
M: array natural-search [ <=> ] with search ;
USING: arrays sequences smalltalk.compiler.return ;
M: array need-return-continuation?
[ need-return-continuation? ] any? ;
USING: arrays reports.noise sequences ;
M: array noise [ noise ] map vsum ;
USING: arrays kernel math sequences.private ;
M: array nth-unsafe [ integer>fixnum ] dip array-nth ; inline
USING: arrays math.combinatorics.private ;
M: array nths-unsafe (nths-unsafe) ;
USING: arrays elevate.unix.private kernel sequences unix.process
;
M: array posix-replace-process
[ first ] [ rest " " prefix ] bi exec-with-path ;
USING: arrays kernel prettyprint.custom ;
M: array pprint-delims drop \ { \ } ;
USING: arrays kernel prettyprint.custom ;
M: array pprint-narrow? drop t ;
USING: arrays prettyprint.backend prettyprint.sections
see.private sequences ;
M: array pprint-slot-name
<flow \ { pprint-word f <inset unclip text pprint-elements
block> \ } pprint-word block> ;
USING: arrays bootstrap.image.private ;
M: array prepare-object [ emit-array ] cache-eq-object ;
USING: arrays elevate.private sequences ;
M: array prepend-command prefix ;
USING: arrays combinators help.markup sequences ;
M: array print-element unclip ( arg -- ) execute-effect ;
USING: arrays kernel rdap.private sequences ;
M: array print-rdap-nested [ print-rdap-nested ] 2with each ;
USING: arrays compiler.cfg.value-numbering sequences ;
M: array process-instruction [ process-instruction ] map ;
USING: arrays tools.crossref.private ;
USING: alien.prettyprint.private arrays sequences ;
M: array record-c-type first record-c-type ;
USING: arrays sequences.private ;
M: array resize resize-array ; inline
USING: arrays kernel math sequences.private ;
M: array set-nth-unsafe [ integer>fixnum ] dip set-array-nth
; inline
USING: arrays compiler.cfg.gvn sequences ;
M: array simplify [ simplify ] map ;
USING: arrays sequences smalltalk.printer ;
M: array smalltalk>string array-element>string "#" prepend ;
USING: arrays math.order sorting.quick ;
M: array sort! [ <=> ] sort-with! ;
USING: alien.strings arrays io.encodings.utf8 sequences ;
M: array symbol>string [ utf8 alien>string ] map ", " join ;
USING: arrays kernel sequences ui.text ui.text.private ;
M: array text-dim
[ { 0 0 } ] 2dip [ string-dim combine-text-dim ] with each ;
USING: arrays compiler.cfg.gvn sequences ;
M: array value-number [ value-number ] each ;
M: array vshuffle vshuffle-elements ; inline
USING: arrays gml.printer io sequences ;
M: array write-gml
"[" write [ bl ] [ write-gml ] interleave "]" write ;