 : (make-curry) ( tail quot -- quot' )
     swap [ncurry] curry [ compose ] compose ;
 
-: make-compose ( consecutive quot -- consecutive quot' )
-    [
-        [ [ ] ]
-        [ [ncurry] ] if-zero
-    ] [
-        [ [ compose ] ]
-        [ [ compose compose ] curry ] if-empty
-    ] bi* compose
-    0 swap ;
+: make-compose ( consecutive quot -- consecutive' quot' )
+    [ [ [ ] ] [ [ncurry] ] if-zero ]
+    [ [ [ compose ] ] [ [ compose compose ] curry ] if-empty ]
+    bi* compose 0 swap ;
 
 : make-curry ( consecutive quot -- consecutive' quot' )
-    [ 1 + ] dip
-    [ [ ] ] [ (make-curry) 0 swap ] if-empty ;
+    [ 1 + ] dip [ [ ] ] [ (make-curry) 0 swap ] if-empty ;
 
 : convert-curry ( consecutive quot -- consecutive' quot' )
     [ [ ] make-curry ] [

PREDICATE: fried-sequence < sequence count-inputs 0 > ;
INSTANCE: fried-sequence fried

: (ncurry) ( quot n -- quot )
    {
        { 0 [ ] }
        { 1 [ \ curry  suffix! ] }


: prune-curries ( seq -- seq' )
    dup [ empty? not ] find
    [ [ 1 + tail ] dip but-last prefix ] [ 2drop { } ] if* ;

: convert-curries ( seq -- tail seq' )
    unclip-slice [ 0 swap [ convert-curry ] map ] dip
