]> gitweb.factorcode.org Git - factor.git/commitdiff
Merge branch 'master' into regexp
authorDaniel Ehrenberg <littledan@Macintosh-122.local>
Tue, 3 Mar 2009 18:24:59 +0000 (12:24 -0600)
committerDaniel Ehrenberg <littledan@Macintosh-122.local>
Tue, 3 Mar 2009 18:24:59 +0000 (12:24 -0600)
Conflicts:

basis/xmode/utilities/utilities-tests.factor
basis/xmode/utilities/utilities.factor

1  2 
basis/xmode/utilities/utilities-tests.factor
basis/xmode/utilities/utilities.factor

index 0ef221f23732e44d69fde9a44ddd316f5c9d1015,538c8cef6b22b7d5fa18f1d1dcbd7c21d1e8f9d2..338878942b0bc45e3bb8feda19a6834292cc0f70
@@@ -1,10 -1,45 +1,2 @@@
 +USING: assocs xmode.utilities tools.test ;
  IN: xmode.utilities.tests
 -USING: accessors xmode.utilities tools.test xml xml.data kernel
 -strings vectors sequences io.files prettyprint assocs
 -unicode.case ;
--
- [ "hi" 3 ] [
-     { 1 2 3 4 5 6 7 8 } [ H{ { 3 "hi" } } at ] map-find
- ] unit-test
 -TUPLE: company employees type ;
--
- [ f f ] [
-     { 1 2 3 4 5 6 7 8 } [ H{ { 11 "hi" } } at ] map-find
 -: <company> V{ } clone f company boa ;
 -
 -: add-employee employees>> push ;
 -
 -<TAGS: parse-employee-tag
 -
 -TUPLE: employee name description ;
 -
 -TAG: employee
 -    employee new
 -    { { "name" f (>>name) } { f (>>description) } }
 -    init-from-tag swap add-employee ;
 -
 -TAGS>
 -
 -\ parse-employee-tag see
 -
 -: parse-company-tag
 -    [
 -        <company>
 -        { { "type" >upper (>>type) } }
 -        init-from-tag dup
 -    ] keep
 -    children>> [ tag? ] filter
 -    [ parse-employee-tag ] with each ;
 -
 -[
 -    T{ company f
 -        V{
 -            T{ employee f "Joe" "VP Sales" }
 -            T{ employee f "Jane" "CFO" }
 -        }
 -        "PUBLIC"
 -    }
 -] [
 -    "vocab:xmode/utilities/test.xml"
 -    file>xml parse-company-tag
--] unit-test
index 1b2b4a352ffede5c44296ae15e3f370b1f3bd4c7,f3e28bd4dab14d953a9f22b00b0e7b7ba3c83611..a7e42877aa2db5ed769d8e63a9343678755e90ff
@@@ -5,11 -4,8 +5,6 @@@ IN: xmode.utilitie
  
  : implies ( x y -- z ) [ not ] dip or ; inline
  
- : map-find ( seq quot -- result elt )
-     [ f ] 2dip
-     '[ nip @ dup ] find
-     [ [ drop f ] unless ] dip ; inline
 -: child-tags ( tag -- seq ) children>> [ tag? ] filter ;
--
  : tag-init-form ( spec -- quot )
      {
          { [ dup quotation? ] [ [ object get tag get ] prepose ] }