Initial commit - fix problems & refactor code

This commit is contained in:
2025-12-22 19:10:46 +03:00
commit ff36917cb5
39 changed files with 1499 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
from typing import Any
from core.exceptions import syntaxError
# from core.printer import Representation
class LinkedList:
value = None
nxt = None
def __init__(self, value_, nxt_):
self.value = value_
self.nxt = nxt_
def car(lst):
return lst.value
def cdr(lst):
return lst.nxt
def cons(val, lst):
return LinkedList(val, lst)
def isList(val):
return isinstance(val, LinkedList)
NIL = cons(None, None)