diff --git a/basis/colors/constants/constants.factor b/basis/colors/constants/constants.factor index 7c9b3ff535..3912994066 100644 --- a/basis/colors/constants/constants.factor +++ b/basis/colors/constants/constants.factor @@ -1,17 +1,15 @@ ! Copyright (C) 2009 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. USING: kernel assocs math math.parser memoize io.encodings.utf8 -io.files lexer parser colors sequences splitting -combinators.smart ascii ; +io.files lexer parser colors sequences splitting ascii ; IN: colors.constants number 255 /f ] tri@ 1.0 ] dip - [ blank? ] trim-head { { CHAR: \s CHAR: - } } substitute swap - ] inputnumber 255 /f ] tri@ 1.0 ] dip + [ blank? ] trim-head { { CHAR: \s CHAR: - } } substitute swap ; : parse-rgb.txt ( lines -- assoc ) [ "!" head? not ] filter diff --git a/basis/combinators/short-circuit/short-circuit.factor b/basis/combinators/short-circuit/short-circuit.factor index a625a462af..dabbe07afb 100644 --- a/basis/combinators/short-circuit/short-circuit.factor +++ b/basis/combinators/short-circuit/short-circuit.factor @@ -1,15 +1,15 @@ USING: kernel combinators quotations arrays sequences assocs -locals generalizations macros fry ; +generalizations macros fry ; IN: combinators.short-circuit -MACRO:: n&& ( quots n -- quot ) - [ f ] quots [| q | - n - [ q '[ drop _ ndup @ dup not ] ] - [ '[ drop _ ndrop f ] ] - bi 2array - ] map - n '[ _ nnip ] suffix 1array +MACRO: n&& ( quots n -- quot ) + [ + [ [ f ] ] 2dip swap [ + [ '[ drop _ ndup @ dup not ] ] + [ drop '[ drop _ ndrop f ] ] + 2bi 2array + ] with map + ] [ '[ _ nnip ] suffix 1array ] bi [ cond ] 3append ; : 2&& ( obj1 obj2 quots -- ? ) [ with with ] unoptimized-&& ; : 3&& ( obj1 obj2 obj3 quots -- ? ) [ with with with ] unoptimized-&& ; -MACRO:: n|| ( quots n -- quot ) - [ f ] quots [| q | - n - [ q '[ drop _ ndup @ dup ] ] - [ '[ _ nnip ] ] - bi 2array - ] map - n '[ drop _ ndrop t ] [ f ] 2array suffix 1array +MACRO: n|| ( quots n -- quot ) + [ + [ [ f ] ] 2dip swap [ + [ '[ drop _ ndup @ dup ] ] + [ drop '[ _ nnip ] ] + 2bi 2array + ] with map + ] [ '[ drop _ ndrop t ] [ f ] 2array suffix 1array ] bi [ cond ] 3append ;