Exercise 3: Vectors and Lists

Let's test your understanding of vectors and lists.

Problem Statement

Use a function that checks whether the testVariable is recursive or not.

Use cat() to display your result on the screen.

Input

A testVariable containing the object being tested.

Output

true if the variable is recursive and false otherwise.

Sample Input

list(1, 1+1i, "a", TRUE)

Sample Output

TRUE

Test Yourself

Write your code in the given area. If you get stuck, you can look at the solution.

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy