From 126d8192ff531a3b147ba4d736b860ceb04733ef Mon Sep 17 00:00:00 2001 From: Carl Eastlund Date: Sat, 27 Aug 2011 14:46:43 -0400 Subject: [PATCH] Added documentation example of sequence/c for multiple-valued sequences. --- collects/unstable/scribblings/contract.scrbl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/collects/unstable/scribblings/contract.scrbl b/collects/unstable/scribblings/contract.scrbl index ed4f8fae0f..216d37d737 100644 --- a/collects/unstable/scribblings/contract.scrbl +++ b/collects/unstable/scribblings/contract.scrbl @@ -201,9 +201,17 @@ for instance, a wrapped list is not guaranteed to satisfy @racket[list?]. #:eval the-eval (define/contract predicates (sequence/c (-> any/c boolean?)) - (list integer? string->symbol)) + (in-list (list integer? + string->symbol))) (for ([P predicates]) (printf "~s\n" (P "cat"))) +(define/contract numbers&strings + (sequence/c number? string?) + (in-dict (list (cons 1 "one") + (cons 2 "two") + (cons 3 'three)))) +(for ([(N S) numbers&strings]) + (printf "~s: ~a\n" N S)) ] }