singleword_valid(sample(1:9))
## Not run:
# singleword_valid(c(5,6,3,9,7,8,2,1)) # returns an error (no '4')
# singleword_valid(c(5,6,3,4,9,7,8,2,1)) # returns an error (not integer)
# ## End(Not run)
cyclist_valid(list(c(1,8,2),c(3,6))) # should be TRUE
## Not run:
# cyclist_valid(list(c(1,8,2),c(8,6))) # returns an error ('8' is repeated)
# ## End(Not run)
Run the code above in your browser using DataLab