Closed TheLostLambda closed 3 years ago
This looks good. There are a lot of functions to talk about here - but I think it will give the student a good foundation of strings.
It is a bit big. I agrees they are good to include, but we can always look into splitting things up if implementing the exercise becomes difficult!
There are a few possible seams to split along, perhaps splitting off searching, splitting off printing...
But I think we should leave that to implementation - like you said - we can split it up if it is too hard.
This document describes how to implement the
strings
concept exercise for the Common Lisp track.Please also watch the following video:
Goal
The goal of this exercise is to familiarise students with strings in Common Lisp and some of the functions for creating and manipulating them (including the relevant sequence functions).
Additionally, the student should be taught how to print values to both strings and the standard output. The focus should be on non-
format
printing functions, asformat
is a complex topic for another set of exercises.Learning objectives
"
string=
, etc.)string-trim
string-upcase
,string-downcase
, etc.concatentate
subseq
find
,find-if
,position
,search
, etc.length
print
write-to-string
Out of scope
map
orloop
format
or other forms of "pretty-printing"reduce
,merge
, etc*standard-output*
variable and other built-in printing variablesConcepts
strings
printing
Prerequisites
expressions
sameness
Resources to refer to
Hints
After
More human-friendly print functions could be mentioned (
princ
,terpri
, etc.)Representer
Analyzer
Implementing
Printing can be mentioned as a debugging technique for the online test-runners, but isn't a large focus here. The focus should be on doing something interesting with string manipulation.
Help
If you have any questions while implementing the exercise, please post the questions as comments in this issue.