Skip to content

Commit

Permalink
Yell implementado.
Browse files Browse the repository at this point in the history
  • Loading branch information
mdssjc committed Jan 23, 2019
1 parent d7f8aac commit 41b23a6
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions racket/HtC1x/1b/yell.rkt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
;; 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 yell) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
;; yell.rkt


;;
;; PROBLEM:
;;
;; DESIGN a function called yell that consumes strings like "hello"
;; and adds "!" to produce strings like "hello!".
;;
;; Remember, when we say DESIGN, we mean follow the recipe.
;;
;; Leave behind commented out versions of the stub and template.

;; String -> String
;; Produce string with "!" added to end of supplied string
(check-expect (yell "hello") "hello!")
(check-expect (yell "bye") "bye!")

;(define (yell s) "") ; stub

;(define (yell s) ; template
; (... s))

(define (yell s)
(string-append s "!"))

0 comments on commit 41b23a6

Please sign in to comment.