From 81c80320914d09d8f72c56237a758c49c3da1ff7 Mon Sep 17 00:00:00 2001 From: Isaac Shoebottom Date: Thu, 10 Apr 2025 08:54:01 -0300 Subject: [PATCH] reformat --- Assignments/04.rkt | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Assignments/04.rkt b/Assignments/04.rkt index 286a887..25e11dc 100644 --- a/Assignments/04.rkt +++ b/Assignments/04.rkt @@ -20,8 +20,7 @@ [let1E (var : Symbol) (te : TypeExp) (value : Exp) (body : Exp)] [recE (var : Symbol) (te : TypeExp) (value : Exp) (body : Exp)] [objE (fields : (Listof (Symbol * Exp)))] - [msgE (obj : Exp) (selector : Symbol)] - ) + [msgE (obj : Exp) (selector : Symbol)]) (define-type Type [numT] @@ -84,11 +83,11 @@ #t (let ([key (first keys)]) (let ([Y-type (some-v (hash-ref Y-fields key))]) - (type-case (Optionof Type) (hash-ref X-fields key) - [(none) #f] ;; Key not found in X-fields - [(some X-type) - (and (subtype? X-type Y-type) ;; Check subtyping of field types - (loop (rest keys)))])))))] ;; Recurse on remaining keys + (type-case (Optionof Type) (hash-ref X-fields key) + [(none) #f] ;; Key not found in X-fields + [(some X-type) + (and (subtype? X-type Y-type) ;; Check subtyping of field types + (loop (rest keys)))])))))] ;; Recurse on remaining keys (loop (hash-keys Y-fields)))] [else #f])]))