www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 8be9371ed2645b8ec195157b2eccdfe83d59257f
parent f68308c38dfb13a829f0bd2afa36840c6367d557
Author: Stephen Chang <stchang@ccs.neu.edu>
Date:   Fri, 17 Feb 2017 11:27:58 -0500

fix mlish chameneos test

Diffstat:
Mmacrotypes/examples/tests/mlish/chameneos.mlish | 13++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/macrotypes/examples/tests/mlish/chameneos.mlish b/macrotypes/examples/tests/mlish/chameneos.mlish @@ -118,9 +118,16 @@ ;; (list 66 0) ;; (list 67 0))) -(check-type (map (λ ([x : Result]) (proj x 0)) - (go 1000 (list Blue Red Yellow Red Yellow Blue))) - : (List Int) -> (list 333 333 333 333 334 334)) +(define res2 + (map (λ ([x : Result]) (proj x 0)) + (go 1000 (list Blue Red Yellow Red Yellow Blue)))) +(check-type res2 : (List Int)) +(define (=333/4 [x : Int] -> Bool) (or (= x 333) (= x 334))) +(define (andmap [p? : (→ X Bool)] [xs : (List X)] → Bool) + (match2 xs with + [nil -> #t] + [x :: rst -> (and (p? x) (andmap p? rst))])) +(check-type (andmap =333/4 res2) : Bool -> #t) ;; -> (list (list 333 0) ;; (list 333 0) ;; (list 333 0)