From 42f89feb911090f5918356b12de0514281deaf37 Mon Sep 17 00:00:00 2001 From: siddharth ravikumar Date: Tue, 12 Jul 2022 23:55:56 -0400 Subject: ex: 51.rkt: implement `below-rot` --- ex/2/50.rkt | 5 ++++- ex/2/51.rkt | 9 +++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'ex/2') diff --git a/ex/2/50.rkt b/ex/2/50.rkt index 3a67578..70c23db 100644 --- a/ex/2/50.rkt +++ b/ex/2/50.rkt @@ -2,7 +2,10 @@ #lang racket -(provide transform-painter) +(provide + transform-painter + counterclockwise-180 + counterclockwise-270) (require "46.rkt") (require "47.rkt") diff --git a/ex/2/51.rkt b/ex/2/51.rkt index 975c064..8f28d76 100644 --- a/ex/2/51.rkt +++ b/ex/2/51.rkt @@ -43,3 +43,12 @@ (lambda (frame) (paint-above frame) (paint-below frame))))) + + +;;; below in terms of rotate operations +(define (below-rot painter1 painter2) + (let ((painter1-270 (counterclockwise-270 painter1)) + (painter2-270 (counterclockwise-270 painter2))) + (counterclockwise-270 + (counterclockwise-180 + (beside painter1-270 painter2-270))))) -- cgit v1.2.3