     compile-library? [ compile-library ] when
     c-library get dup library-path "cdecl" add-library ;
 
-: define-c-function ( function types effect -- )
-    [ factor-function define-declared ] 3keep prototype-string
-    append-function-body c-strings get push ;
+: define-c-function ( function types effect body -- )
+    [
+        [ factor-function define-declared ]
+        [ prototype-string ] 3bi
+    ] dip append-function-body c-strings get push ;
 
-: define-c-function' ( function effect -- )
-    [ in>> ] keep [ factor-function define-declared ] 3keep
-    out>> prototype-string'
-    append-function-body c-strings get push ;
+: define-c-function' ( function effect body -- )
+    [
+        [ in>> ] keep
+        [ factor-function define-declared ]
+        [ out>> prototype-string' ] 3bi
+    ] dip append-function-body c-strings get push ;
 
 : define-c-link ( str -- )
     "-l" prepend compiler-args get push ;

: prototype-string' ( function types return -- str )
    [ dup arg-list ] <effect> prototype-string ;

: append-function-body ( prototype-str -- str )
    " {\n" append parse-here append "\n}\n" append ;

: compile-library? ( -- ? )
    c-library get library-path dup exists? [

SYNTAX: C-INCLUDE: scan define-c-include ;

SYNTAX: C-FUNCTION:
    function-types-effect parse-here define-c-function ;

SYNTAX: C-TYPEDEF: scan scan define-c-typedef ;

