From last week, we learned reverse the lists, rest of the list, range list of integers from 1 to 20,etc.
For example:
(first (rest (reverse (rest (list 0 1 2 3 4 5))))
the answer is 4
Firstly, we get (rest 0 1 2 3 4 5 )
then, we get (5 4 3 2 1 0)
next, we get (rest 4 3 2 1 0)
Finally, we get 4
we can conclude that if the number are images it can easily know what images order and e can easily show to the everybody the first image is which one.
Also, we learns an interesting knowledge : check values parts of expression.
eg :(check-expect (first (list 0 1 2 3 4 5 6 7 ) whether 0 or not
that exactly means:
We can let the computer be a smart teacher!!!
没有评论:
发表评论