From 302cad4ca5e3252da7163a7442d11308614af816 Mon Sep 17 00:00:00 2001
From: Pjotr Vugts <p.t.vugts@students.uu.nl>
Date: Tue, 10 Jan 2023 14:14:51 +0100
Subject: [PATCH] __repr__ voor Variable

---
 main.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/main.py b/main.py
index b57cfb0..b46af5d 100644
--- a/main.py
+++ b/main.py
@@ -22,7 +22,8 @@ class Variable(LambdaTerm):
     def __init__(self, symbol): 
         self.symbol = symbol
 
-    def __repr__(self): raise NotImplementedError
+    def __repr__(self): 
+        return f"Variable('{self.symbol}')"
 
     def __str__(self): 
         return str(self.symbol)
@@ -57,4 +58,4 @@ class Application(LambdaTerm):
 
     def reduce(self): raise NotImplementedError
 
-print(str(Variable('x')))
\ No newline at end of file
+print(repr(Variable('x')))
\ No newline at end of file
-- 
GitLab