nth-next ( i str -- str[i-1] str[i] ) (original) (raw)
nth-next ( i str -- str[i-1] str[i] )
Inputs
i | an object |
---|---|
str | an object |
Outputs
str[i-1] | an object |
---|---|
str[i] | an object |
Definition
USING: kernel math sequences ;
: nth-next ( i str -- str[i-1] str[i] )
[ [ 1 - ] keep ] dip [ nth ] curry bi@ ;