accept1 ( n string quot: ( ch -- ? ) -- n/n' string ch/f )


Vocabulary
modern.slices

Inputs
nan object
stringan object
quota quotation with stack effect ( ch -- ? )


Outputs
n/n'an object
stringan object
ch/fan object


Definition


: accept1 ( n string quot: ( ch -- ? ) -- n/n' string ch/f )
[ 2dup nth ] dip 1check [ [ 1 + ] 2dip ] [ drop f ] if ;
inline