-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathex037.rkt
11 lines (11 loc) · 898 Bytes
/
ex037.rkt
1
2
3
4
5
6
7
8
9
10
11
;; The first three lines of this file were inserted by DrRacket. They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex037) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp") (lib "batch-io.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp") (lib "batch-io.rkt" "teachpack" "2htdp")) #f)))
; String -> String
; Produces a copy of string str without its first character.
; given: "hello world", expected: "ello world"
; given: "Uppercase randoM", expected: "ppercase randoM"
; given: "", expected: error
; given: " I need space ", expected: "I need space "
(define (string-rest str)
(substring str 1))