powered by
literal tests whether a supplied string literally equals a desired value.
literal
literal(string)
A parser.
string, a single-element character vector, or an object that can be coerced to a character vector.
literal(a)(x): satisfy(F(y): y==a)(x)
where F is equivalent to the function declarator in R. So, we have an anonymous function in the argument of satisfy.
F
function
satisfy
literal("ab") (c("ab", "cdef")) # success literal("ab") (c("abc", "cdef")) # failure
Run the code above in your browser using DataLab