: delete-random ( seq -- value )
[ length random ] keep [ nth ] 2keep delete-nth ;
+: split-around ( seq quot -- before elem after )
+ dupd find over [ "Element not found" throw ] unless
+ >r cut-slice 1 tail r> swap ; inline
+
: (map-until) ( quot pred -- quot )
[ dup ] swap 3compose
[ [ drop t ] [ , f ] if ] compose [ find 2drop ] curry ;