Functional Problem Solving (CSC 151 2016S) : Reference
Primary: [Front Door] [Schedule] - [Academic Honesty] [Disabilities] [Email] - [FAQ] [Teaching & Learning] [Grading] [Taking Notes] [Rubric]
Current: [Assignment] [EBoard] [Lab] [Outline] [Reading]
Sections: [Assignments] [EBoards] [Labs] [Outlines] [Readings] - [Examples] [Handouts]
Reference: [Setup] [Remote] [VM] [Errors] - [Functions A-Z] [Functions By Topic] - [Racket] [Scheme Report (R5RS)] [R6RS] [TSPL4]
Related Courses: [Curtsinger (2016S)] [Davis (2013F)] [Rebelsky (2015F)] [Weinman (2014F)]
Misc: [SamR] [Glimmer Labs] [CS@Grinnell] [Grinnell] - [Issue Tracker (Course)]
(make-vector
length
val)
length,
containing only copies of val.
(vector
val_0
val_1 ...
val_n)
n+1 of the form
#(val_0 val_1
... val_n).
(vector-ref
vec
n)
nth element of
vec. Note that elements are numbered
starting at 0.
(vector-set!
vec
k
val)
kth element of
vec to val.
(Note that vectors use 0-based indexing.)
(list->vector
lst)
lst to a vector so that
the ith value in the vector is the same as the ith value in the lst.
(vector->list
vec)
vec to a list so that
the ith value in the list is the same as the ith value in the vector.
(vector?
val)
val is a vector.
(vector-fill!
vec
val)
vec with multiple copies of
val.
(vector-length
vec)
vec.