Update u2/list_ops.py
This commit is contained in:
parent
d731d5db90
commit
8f70c5255c
@ -1,4 +1,3 @@
|
||||
|
||||
def append(list1, list2):
|
||||
result = []
|
||||
for item in list1:
|
||||
@ -24,4 +23,14 @@ def length(l):
|
||||
result = 0
|
||||
for item in l:
|
||||
result +=1
|
||||
return result
|
||||
return result
|
||||
|
||||
def map(function, list):
|
||||
|
||||
|
||||
def foldl(function, list, initial):
|
||||
|
||||
|
||||
def foldr(function, list, initial):
|
||||
|
||||
def reverse(list):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user