<br>> I did some study on that chapter but I cannnot make it work,<br>> This is what I have so far :<br>><br>> ;;String -> String<br>> ;; Get the first character of a string (s) if there is one. error otherwise.<br>
> ;; given "aaaa" expected "a"<br>> ;; given "" expected "<br>> (define (first-string s)<br>> (cond<br>> [(eq? s "") (error "first-string" "Empty string found")] ;; check for a empty string.if so put a error message<br>
> [(and (string? s) (not(eq? s ""))) (string-ith s 0)] ;; if it's a non-empty string then do the trick.<br>> [(number? s) (error "first-string" "No string found")] ;; if it's a number then put a error message<br>
> [(boolean? s) (error "first-string" "No string found")] ;; if it's a boolean then put a error message<br>> [(image? s) (error "first string" "No string found")] ;; if it's a image put a error message<br>
> ))<br>><br>> But when I do (first-string ") then still DrRacket gives his own error message instead of the one I made.<br>> Any tips are welcome here.<br><br><br>What is the exact content of the error message that DrRacket gives you?