RosettaCodeData/Task/Word-wrap/Racket/word-wrap-1.rkt
Ingy döt Net 776bba907c Sync
2013-10-27 22:24:23 +00:00

13 lines
784 B
Racket

#lang at-exp racket
(require scribble/text/wrap)
(define text
@(λ xs (regexp-replace* #rx" *\n *" (string-append* xs) " ")){
In olden times when wishing still helped one, there lived a king whose
daughters were all beautiful, but the youngest was so beautiful that the
sun itself, which has seen so much, was astonished whenever it shone in her
face. Close by the king's castle lay a great dark forest, and under an old
lime-tree in the forest was a well, and when the day was very warm, the
king's child went out into the forest and sat down by the side of the cool
fountain, and when she was bored she took a golden ball, and threw it up on
high and caught it, and this ball was her favorite plaything.})
(for-each displayln (wrap-line text 60))