From 8a66947527c1a0c9e863f515ced40133c7b51a64 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Thu, 18 Dec 2008 00:16:43 -0600 Subject: [PATCH] Eliminating usages of combinators/sequences/etc.lib --- extra/automata/ui/ui.factor | 10 +++++----- extra/bake/bake.factor | 2 +- extra/cfdg/cfdg.factor | 4 ++-- extra/dns/dns.factor | 13 +++++++------ extra/dns/server/server.factor | 6 +++--- extra/dns/util/util.factor | 8 +++----- .../math/function-tools/function-tools.factor | 2 +- extra/newfx/newfx.factor | 18 +++++++++--------- extra/random-weighted/random-weighted.factor | 4 ++-- extra/rewrite-closures/rewrite-closures.factor | 9 ++++----- extra/self/self.factor | 4 +--- extra/trails/trails.factor | 12 +++++++++++- 12 files changed, 49 insertions(+), 43 deletions(-) diff --git a/extra/automata/ui/ui.factor b/extra/automata/ui/ui.factor index 9210097cab..def71e7e67 100644 --- a/extra/automata/ui/ui.factor +++ b/extra/automata/ui/ui.factor @@ -15,7 +15,7 @@ USING: kernel namespaces math quotations arrays hashtables sequences threads ui.gadgets.theme ui.gadgets.handler accessors - namespaces.lib assocs.lib vars + vars fry rewrite-closures automata math.geometry.rect newfx ; IN: automata.ui @@ -24,9 +24,9 @@ IN: automata.ui : draw-point ( y x value -- ) 1 = [ swap glVertex2i ] [ 2drop ] if ; -: draw-line ( y line -- ) 0 swap [ >r 2dup r> draw-point 1+ ] each 2drop ; +: draw-line ( y line -- ) 0 swap [ [ 2dup ] dip draw-point 1+ ] each 2drop ; -: (draw-bitmap) ( bitmap -- ) 0 swap [ >r dup r> draw-line 1+ ] each drop ; +: (draw-bitmap) ( bitmap -- ) 0 swap [ [ dup ] dip draw-line 1+ ] each drop ; : draw-bitmap ( bitmap -- ) GL_POINTS glBegin (draw-bitmap) glEnd ; @@ -46,9 +46,9 @@ VAR: slate ! Create a quotation that is appropriate for buttons and gesture handler. -: view-action ( quot -- quot ) [ drop [ ] with-view ] make* closed-quot ; +: view-action ( quot -- quot ) '[ drop _ with-view ] closed-quot ; -: view-button ( label quot -- ) >r