Merge branch 'master' of git://factorcode.org/git/factor
commit
a1f1330586
|
@ -1,7 +1,7 @@
|
|||
USING: xmode.loader xmode.utilities xmode.rules namespaces
|
||||
strings splitting assocs sequences kernel io.files xml memoize
|
||||
words globs combinators io.encodings.utf8 sorting accessors xml.data
|
||||
xml.traversal xml.syntax ;
|
||||
words globs combinators io.encodings.utf8 io.pathnames sorting
|
||||
accessors xml.data xml.traversal xml.syntax ;
|
||||
IN: xmode.catalog
|
||||
|
||||
TUPLE: mode file file-name-glob first-line-glob ;
|
||||
|
@ -113,7 +113,11 @@ ERROR: mutually-recursive-rulesets ruleset ;
|
|||
[ nip ] 2keep first-line-glob>> ?glob-matches
|
||||
[ 2drop t ] [ file-name-glob>> ?glob-matches ] if ;
|
||||
|
||||
: find-mode ( file-name first-line -- mode )
|
||||
: ?find-mode ( file-name first-line -- mode/f )
|
||||
[ file-name ] dip
|
||||
modes
|
||||
[ nip [ 2dup ] dip suitable-mode? ] assoc-find
|
||||
2drop [ 2drop ] dip [ "text" ] unless* ;
|
||||
2drop [ 2drop ] dip ;
|
||||
|
||||
: find-mode ( file-name first-line -- mode )
|
||||
?find-mode "text" or ; inline
|
||||
|
|
|
@ -15,7 +15,7 @@ ABOUT: "sets"
|
|||
|
||||
ARTICLE: "set-operations" "Operations on sets"
|
||||
"To test if an object is a member of a set:"
|
||||
{ $subsections member? }
|
||||
{ $subsections in? }
|
||||
"All sets can be represented as a sequence, without duplicates, of their members:"
|
||||
{ $subsections members }
|
||||
"Sets can have members added or removed destructively:"
|
||||
|
|
Loading…
Reference in New Issue