Fix circularity

db4
Slava Pestov 2009-02-10 16:42:35 -06:00
parent ab386d01aa
commit 43e6a6987a
3 changed files with 17 additions and 17 deletions

View File

@ -1,10 +1,9 @@
! Copyright (C) 2007, 2008 Daniel Ehrenberg
! Portions copyright (C) 2009 Slava Pestov
! See http://factorcode.org/license.txt for BSD license.
USING: accessors arrays assocs classes.tuple definitions
generalizations generic generic.standard hashtables kernel
lexer make math parser generic.parser sequences sets slots
words words.symbol fry ;
USING: accessors arrays assocs classes.tuple definitions generic
generic.standard hashtables kernel lexer make math parser
generic.parser sequences sets slots words words.symbol fry ;
IN: delegate
: protocol-words ( protocol -- words )
@ -30,7 +29,7 @@ M: tuple-class group-words
: consult-method ( word class quot -- )
[ drop swap first create-method-in ]
[ nip [ , dup second , \ ndip , first , ] [ ] make ] 3bi
[ nip [ swap [ second [ [ dip ] curry ] times % ] [ first , ] bi ] [ ] make ] 3bi
define ;
: change-word-prop ( word prop quot -- )

View File

@ -2,7 +2,7 @@
! Cavazos, Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: kernel sequences sequences.private math combinators
macros quotations fry stack-checker.transforms effects ;
macros quotations fry effects ;
IN: generalizations
<<
@ -94,12 +94,4 @@ MACRO: nweave ( n -- )
: nappend-as ( n exemplar -- seq )
[ narray concat ] dip like ; inline
: nappend ( n -- seq ) narray concat ; inline
: nths-quot ( indices -- quot )
[ [ '[ _ swap nth ] ] map ] [ length ] bi
'[ _ cleave _ narray ] ;
\ shuffle [
shuffle-mapping nths-quot
] 1 define-transform
: nappend ( n -- seq ) narray concat ; inline

View File

@ -4,8 +4,8 @@ USING: fry accessors arrays kernel words sequences generic math
namespaces make quotations assocs combinators classes.tuple
classes.tuple.private effects summary hashtables classes generic
sets definitions generic.standard slots.private continuations locals
stack-checker.backend stack-checker.state stack-checker.visitor
stack-checker.errors stack-checker.values
generalizations stack-checker.backend stack-checker.state
stack-checker.visitor stack-checker.errors stack-checker.values
stack-checker.recursive-state ;
IN: stack-checker.transforms
@ -155,3 +155,12 @@ IN: stack-checker.transforms
\ memq? [
dup sequence? [ memq-quot ] [ drop f ] if
] 1 define-transform
! Shuffling
: nths-quot ( indices -- quot )
[ [ '[ _ swap nth ] ] map ] [ length ] bi
'[ _ cleave _ narray ] ;
\ shuffle [
shuffle-mapping nths-quot
] 1 define-transform