1/5
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
build-list
2 parameters
1. Natural number n, the length of the list
Function (lambda (i)…) where i is the index (0 to n-1). No accumulators
Returns a list of length n with each element modified by the function
map
2 parameters
Function (lambda (x)…) or a named function. No accumulators
List (can be multiple)
Returns a list of the same length with each element transformed by the function
filter
2 parameters
Predicate function or a predicate (lambda (x)…)
List
Returns list with only the elements satisfying the predicate
sort
2 parameters
List
Comparator function or a (lambda (x y)…) function with an accumulator, since you need to compare two items
Returns list where that aligns with the comparator
foldr
3 parameters
Function (lambda (x y)…)
Base value, the starting accumulator
List
Returns a single value (can be anything), processes from right to left
foldl
3 parameters
Function (lambda (x y)…)
Base value, the starting accumulator
List
Returns a single value (can be anything), processes from left to right