How to Design Programming(文件写入)

#lang racket

(require 2htdp/batch-io)

(define (letter fst lst signature-name)
  (string-append
    (opening fst)
    "\n\n"
    (body fst lst)
    "\n\n"
    (closing signature-name)))
 
(define (opening fst)
  (string-append "Dear " fst ","))
 
(define (body fst lst)
  (string-append
   "We have discovered that all people with the" "\n"
   "last name " lst " have won our lottery. So, " "\n"
   fst ", " "hurry and pick up your prize."))
 
(define (closing signature-name)
  (string-append
   "Sincerely,"
   "\n\n"
   signature-name
   "\n"))


How to Design Programming(文件写入)How to Design Programming(文件写入) jonesdlj 发布了105 篇原创文章 · 获赞 154 · 访问量 4万+ 私信 关注
上一篇:UCF Local Programming Contest 2015


下一篇:UCF Local Programming Contest 2015