Stellar Study Cards

Racket Flashcards | Learn Scheme and Functional Programming

55 Total Cards in This Deck

Racket Flashcards | Learn Scheme and Functional Programming

Arrow keys or swipe to navigate cards

1 / 55 Total
Introduction to Racket

What is Racket primarily used for?

2 / 55 Total
Introduction to Racket

How do you define a function in Racket?

3 / 55 Total
Introduction to Racket

What is the basic syntax for a conditional expression in Racket?

4 / 55 Total
Introduction to Racket

How do you create a list in Racket?

5 / 55 Total
Introduction to Racket

How can you write a comment in Racket?

6 / 55 Total
Basic Syntax and Semantics

What is the basic syntax for defining a function in Racket?

7 / 55 Total
Basic Syntax and Semantics

How do you create a list in Racket?

8 / 55 Total
Basic Syntax and Semantics

What is the syntax for a conditional expression in Racket?

9 / 55 Total
Basic Syntax and Semantics

How do you add comments in Racket?

10 / 55 Total
Basic Syntax and Semantics

How can you bind a variable to a value in Racket?

11 / 55 Total
Basic Syntax and Semantics

What is the syntax for expressing a loop in Racket?

12 / 55 Total
Basic Syntax and Semantics

How do you perform mathematical operations, such as addition, in Racket?

13 / 55 Total
Functional Programming Principles

What is a pure function in functional programming?

14 / 55 Total
Functional Programming Principles

How does recursion differ from iteration in functional programming?

15 / 55 Total
Functional Programming Principles

What is first-class function treatment in functional programming?

16 / 55 Total
Functional Programming Principles

Describe the concept of higher-order functions.

17 / 55 Total
Functional Programming Principles

What is referential transparency in the context of functional programming?

18 / 55 Total
Functional Programming Principles

Explain the role of immutability in functional programming.

19 / 55 Total
Lists and Recursion in Racket

What is recursion in functional programming?

20 / 55 Total
Lists and Recursion in Racket

How do you define a list in Racket?

21 / 55 Total
Lists and Recursion in Racket

What is a base case in recursion?

22 / 55 Total
Lists and Recursion in Racket

How can you find the length of a list in Racket?

23 / 55 Total
Lists and Recursion in Racket

What is the purpose of the 'cons' function in Racket?

24 / 55 Total
Lists and Recursion in Racket

Explain how to access the first element of a list.

25 / 55 Total
Lists and Recursion in Racket

What does the 'cdr' function do in Racket?

26 / 55 Total
Lists and Recursion in Racket

Give an example of a simple recursive function in Racket.

27 / 55 Total
Higher-Order Functions in Racket

What is a higher-order function in programming?

28 / 55 Total
Higher-Order Functions in Racket

How does the `map` function work in Racket?

29 / 55 Total
Higher-Order Functions in Racket

What does the `filter` function do in Racket?

30 / 55 Total
Higher-Order Functions in Racket

Explain the use of `apply` in Racket.

31 / 55 Total
Higher-Order Functions in Racket

What does the `compose` function do in Racket?

32 / 55 Total
Scheme-specific Features

What is the primary data structure used in Scheme?

33 / 55 Total
Scheme-specific Features

How does Scheme handle variables?

34 / 55 Total
Scheme-specific Features

What is a unique feature of Scheme's syntax?

35 / 55 Total
Scheme-specific Features

Describe how loops are implemented in Scheme.

36 / 55 Total
Modules and Libraries

What is the purpose of using modules in Racket?

37 / 55 Total
Modules and Libraries

How do you define a module in Racket?

38 / 55 Total
Modules and Libraries

What is the role of the #lang directive in Racket modules?

39 / 55 Total
Modules and Libraries

How can you import a module in Racket?

40 / 55 Total
Modules and Libraries

What is the function of libraries in Racket?

41 / 55 Total
Modules and Libraries

How can you provide functions or variables from a module in Racket?

42 / 55 Total
Error Handling and Debugging

What is the purpose of error handling in Racket?

43 / 55 Total
Error Handling and Debugging

How can you catch and handle an exception in Racket?

44 / 55 Total
Error Handling and Debugging

What function can be used to trigger an error in Racket?

45 / 55 Total
Error Handling and Debugging

How can you use a custom error handler function in Racket?

46 / 55 Total
Advanced Topics

What is the difference between tail recursion and non-tail recursion in Racket?

47 / 55 Total
Advanced Topics

How can you perform memoization in Racket to optimize recursive functions?

48 / 55 Total
Advanced Topics

What is a continuation and how is it used in Racket?

49 / 55 Total
Advanced Topics

Describe how macros work in Racket and their purpose.

50 / 55 Total
Advanced Topics

Explain the concept of lazy evaluation and how it can be implemented in Racket.

51 / 55 Total
Practical Applications

How would you implement a factorial function in Racket using recursion?

52 / 55 Total
Practical Applications

What is the purpose of using higher-order functions in functional programming?

53 / 55 Total
Practical Applications

Explain how map function works in Racket and provide an example.

54 / 55 Total
Practical Applications

How can Racket's filter function be used to extract even numbers from a list?

55 / 55 Total
Practical Applications

Describe how list comprehension might be accomplished in Racket.