basis/extra: removing '[ @ ] in favor of _ for fried quotations.

factor-shell
John Benediktsson 2018-01-19 23:40:23 -08:00
parent dcb06f3cbd
commit b40ba26bac
13 changed files with 14 additions and 14 deletions

View File

@ -139,7 +139,7 @@ MACRO: map-reduce-outputs ( quot mapper reducer -- quot )
MACRO: smart-reduce ( reduce-quots -- quot )
unzip [ [ ] like ] bi@ dup length dup '[
[ @ ] dip [ @ _ cleave-curry _ spread* ] each
_ dip [ @ _ cleave-curry _ spread* ] each
] ;
MACRO: smart-map-reduce ( map-reduce-quots -- quot )
@ -151,7 +151,7 @@ MACRO: smart-map-reduce ( map-reduce-quots -- quot )
MACRO: smart-2reduce ( 2reduce-quots -- quot )
unzip [ [ ] like ] bi@ dup length dup '[
[ @ ] 2dip
_ 2dip
[ @ _ [ cleave-curry ] [ cleave-curry ] bi _ spread* ] 2each
] ;

View File

@ -70,7 +70,7 @@ M: ##horizontal-shl-vector-imm insn-available? rep>> %horizontal-shl-vector-imm-
M: ##horizontal-shr-vector-imm insn-available? rep>> %horizontal-shr-vector-imm-reps member? ;
: [vector-op-checked] ( #dup quot -- quot )
'[ _ ndup [ @ ] { } make dup [ insn-available? ] all? ] ;
'[ _ ndup _ { } make dup [ insn-available? ] all? ] ;
GENERIC#: >vector-op-cond 2 ( quot #pick #dup -- quotpair )
M:: callable >vector-op-cond ( quot #pick #dup -- quotpair )

View File

@ -103,7 +103,7 @@ RENAMING: assign [ vreg>reg ] [ vreg>reg ] [ vreg>reg ]
: change-insn-gc-roots ( gc-map-insn quot: ( x -- x ) -- )
[ gc-map>> ] dip [ swap gc-roots>> swap map! drop ]
[ '[ [ [ @ ] bi@ ] assoc-map ] change-derived-roots drop ] 2bi ; inline
[ '[ [ _ bi@ ] assoc-map ] change-derived-roots drop ] 2bi ; inline
: spill-required? ( live-interval root-leaders n -- ? )
[ [ vreg>> ] dip sets:in? ] [ swap covers? ] bi-curry* bi or ;

View File

@ -300,7 +300,7 @@ CONSTANT: lookup-table-at-max 256
\ at* [ at-quot ] 1 define-partial-eval
: diff-quot ( seq -- quot: ( seq' -- seq'' ) )
[ tester ] keep '[ members [ @ ] reject _ set-like ] ;
[ tester ] keep '[ members _ reject _ set-like ] ;
M\ sets:set diff [ diff-quot ] 1 define-partial-eval

View File

@ -214,7 +214,7 @@ CONSTANT: log10-2 0x1.34413509f79ffp-2
: (bignum-log) ( n log-quot: ( x -- y ) log-2 -- log )
[ dup ] dip '[
dup representable-as-float?
[ >float @ ] [ frexp [ @ ] [ _ * ] bi* + ] if
[ >float @ ] [ frexp _ [ _ * ] bi* + ] if
] call ; inline
PRIVATE>

View File

@ -237,7 +237,7 @@ M: sequence square-cols
[ length ] keep [ <array> ] with { } map-as ;
: make-matrix-with-indices ( m n quot -- matrix )
[ [ <iota> ] bi@ ] dip '[ @ ] cartesian-map ; inline
[ [ <iota> ] bi@ ] dip cartesian-map ; inline
: null-matrix? ( matrix -- ? ) empty? ; inline

View File

@ -123,7 +123,7 @@ PRIVATE>
MACRO: unpack ( str -- quot )
expand-pack-format
[ [ ch>packed-length ] { } map-as start/end ]
[ [ unpack-table at '[ @ ] ] { } map-as ] bi
[ [ unpack-table at ] { } map-as ] bi
[ '[ [ _ _ ] dip <slice> @ ] ] 3map
'[ [ _ cleave ] output>array ] ;

View File

@ -122,7 +122,7 @@ M: f (literal) current-word get bad-macro-input ;
GENERIC: known>callable ( known -- quot )
: ?@ ( x -- y )
dup callable? [ drop [ @ ] ] unless ;
dup callable? [ drop _ ] unless ;
M: object known>callable drop \ _ ;

View File

@ -6,6 +6,6 @@ IN: changer
MACRO: inline-changer ( name -- quot' )
[ ">>" append ] [ ">>" prepend ] bi
[ "accessors" lookup-word 1quotation ] bi@
'[ over [ [ @ ] dip call ] dip swap @ ] ;
'[ over [ _ dip call ] dip swap @ ] ;
SYNTAX: change: scan-token '[ _ inline-changer ] append! ;

View File

@ -9,7 +9,7 @@ IN: io.random
<PRIVATE
: each-numbered-line ( ... quot: ( ... line number -- ... ) -- ... )
[ 1 ] dip '[ swap [ @ ] [ 1 + ] bi ] each-line drop ; inline
[ 1 ] dip '[ swap _ [ 1 + ] bi ] each-line drop ; inline
PRIVATE>

View File

@ -95,7 +95,7 @@ FUNCTION: c-string udev_list_entry_get_value (
! Helper to iterate over all entries of a list.
: udev_list_entry_foreach ( ... first_entry quot: ( ... x -- ... ) -- ... )
[ [ dup ] ] dip '[ [ @ ] keep udev_list_entry_get_next ]
[ [ dup ] ] dip '[ _ keep udev_list_entry_get_next ]
while drop ; inline
! Get all list entries _as_ a list

View File

@ -84,7 +84,7 @@ PRIVATE>
: (write-message) ( message quot -- )
[ connection-buffer dup ] 2dip
'[
[ _ [ write-header ] [ @ ] bi ] with-length-prefix
[ _ [ write-header ] _ bi ] with-length-prefix
] with-output-stream* write flush ; inline
:: build-query-object ( query -- selector )

View File

@ -23,7 +23,7 @@ IN: tools.image-analyzer.utils
: until-eof-reader ( reader-quot -- reader-quot' )
'[
[ [ @ ] throw-on-eof ] [
[ _ throw-on-eof ] [
dup stream-exhausted? [ drop f ] [ throw ] if
] recover
] ; inline