From ef00bbf1689aa6487dae14bf85158723ea76a7c1 Mon Sep 17 00:00:00 2001 From: jmug Date: Thu, 30 Jan 2025 21:06:06 -0800 Subject: [PATCH] Even terser syntax Signed-off-by: jmug --- hw2/bin/simulator.ml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw2/bin/simulator.ml b/hw2/bin/simulator.ml index 03cc72d..a6a71eb 100644 --- a/hw2/bin/simulator.ml +++ b/hw2/bin/simulator.ml @@ -169,8 +169,7 @@ let ( >=. ) a b = Int64.compare a b >= 0 (* Interpret a condition code with respect to the given flags. *) (* !!! Check the Specification for Help *) -let interp_cnd { fo; fs; fz } : cnd -> bool = fun c -> - match c with +let interp_cnd { fo; fs; fz } : cnd -> bool = function | Eq -> fz | Neq -> not fz | Gt -> fo = fs && not fz