 : crlf>lf CHAR: \r swap remove ;
 : lf>crlf [ [ dup CHAR: \n = [ CHAR: \r , ] when , ] each ] "" make ;
 
-: (enum-clipboard) ( n -- n )
-    EnumClipboardFormats win32-error dup 0 > [ dup , (enum-clipboard) ] when ;
-
 : enum-clipboard ( -- seq )
-    [ 0 (enum-clipboard) ] { } make nip ;
+    0 [ EnumClipboardFormats win32-error dup dup 0 > ] [ ]
+    { } unfold nip ;
 
 : with-clipboard ( quot -- )
     f OpenClipboard win32-error=0/f
     call
     CloseClipboard win32-error=0/f ; inline
-    
 
 : paste ( -- str )
     [
-        CF_UNICODETEXT IsClipboardFormatAvailable 0 = [
+        CF_UNICODETEXT IsClipboardFormatAvailable zero? [
             ! nothing to paste
             ""
         ] [


                ! Keyboard events
                { [ dup WM_KEYDOWN = over WM_SYSKEYDOWN = or ]
                    [ drop 4dup handle-wm-keydown DefWindowProc ] }
                { [ dup WM_CHAR = over WM_SYSCHAR = or ]
                    [ drop 4dup handle-wm-char DefWindowProc ] }
                { [ dup WM_KEYUP = over WM_SYSKEYUP = or ]

    } ;

: key-state-down?
    GetKeyState 16 bit? ;

: left-shift? ( -- ? ) VK_LSHIFT key-state-down? ;
: left-ctrl? ( -- ? ) VK_LCONTROL key-state-down? ;
