1/24
Flashcards covering essential vocabulary, list procedures, predicates, control flow structures, higher-order functions, and shell commands from the lecture notes.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
first
A function that returns the first item of a list.
rest
A function that returns everything but the first item of a list.
empty?
A predicate that checks if a list is empty.
cons
A function that adds one item to the front of a list.
append
A function that joins two lists together, requiring a list on both sides.
car
The old name for first.
cdr
The old name for rest.
flonum?
A predicate that checks if a value is a floating-point number, which must be checked before integer type checks because (integer? 1.0) returns #t.
quotient
A math function that computes whole-number division.
remainder
A math function that returns the remainder of division; pairs with quotient for base conversion.
apply
A function that spreads a list out as separate arguments for a function that expects them.
cond
A control flow expression that tests clauses top to bottom in order.
let
A control flow structure used to name intermediate results and avoid repeating recursive calls.
lambda
A construct that makes an unnamed function on the spot.
map
A higher-order function that transforms every item in a list using a function.
filter
A higher-order function that keeps only the items in a list that pass a test predicate.
assq
A lookup table search function that uses eq? to compare keys.
assv
A lookup table search function that uses eqv? to compare keys, making it safe for numbers.
assoc
A lookup table search function that uses equal? to compare keys, which works on lists and strings.
remove-duplicates
A function that removes duplicate values from a list.
sort
A function that sorts a list based on a comparison function such as < or symbol<?.
mv
A shell command used to rename or move a file.
cd
A shell command used to change the current directory.
ls -l
A shell command used to list files with details.
touch
A shell command used to create an empty file.