 ! ======================================
 
 : irc-mailbox-get ( mailbox quot -- )
-    swap 5 seconds  [ mailbox-get-timeout swap call ] 3curry [ drop ] recover ;
+    swap 5 seconds  '[ , , , mailbox-get-timeout swap call ] [ drop ] recover ;
 
 : stream-readln-or-close ( stream -- str/f )
     dup stream-readln [ nip ] [ dispose f ] if* ;

! ======================================

: split-at-first ( seq separators -- before after )
    dupd [ member? ] curry find
        [ cut 1 tail ]
        [ swap ]
    if ;

! ======================================

: set+run-listener ( name irc-listener -- )
    [ '[ , , listener-loop ] "listener" spawn-irc-loop ]
    [ swap irc> listeners>> set-at ]
    2bi ;

