Skip to content
Snippets Groups Projects
Commit e690817d authored by Louis Chmielewski's avatar Louis Chmielewski
Browse files

merge_sort native_to_list

parent f0e3c2c7
Branches
No related tags found
No related merge requests found
......@@ -57,7 +57,7 @@ def length(li: ApLst) -> int:
3
"""
if not li.is_empty():
res = 1 + lenght(li.tail())
res = 1 + length(li.tail())
else:
res = 0
return res
......@@ -85,7 +85,11 @@ def native_to_list(li: list[T]) -> ApLst:
$$$ l.head()
4
"""
if li != []:
res = ApLst(li[0], native_to_list(li[1:]))
else:
res = ApLst()
return res
def list_to_native(li: ApLst) -> list[T]:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment