about summary refs log tree commit diff
path: root/src/HW.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/HW.hs')
-rw-r--r--src/HW.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/HW.hs b/src/HW.hs
index 88fb1c2..ee26584 100644
--- a/src/HW.hs
+++ b/src/HW.hs
@@ -13,9 +13,9 @@ import Parse (parse)
 
 -- | Return the free variables in an expression
 fv :: Expr -> Set.Set String
-fv _ = Set.singleton "UNIMPLEMENTED" -- Replace with your solution to problem 1
-
-
+fv (Var x) = Set.singleton x
+fv (Lam x m) = x `Set.delete` (fv m)
+fv (App m1 m2) = (fv m1) `Set.union` (fv m2)
 
 -- | Substitute n for x in e, avoiding name capture
 --    subst n x e     e[x := n]