— Well, yeah, it might be
— But it's sort of ugly and PHP-ish too
— It's the easiest, but is it the best?
— I think it is the least expensive solution
— The only other thing would be to expose state via curried environment monads
— Ask. How to set and get session?
— Which is great for shared state, as you are using pure functions
— How to do something like this with javascript
— Language:
python3
Source:
l = [1,2,2,3,3,3,4,4]
def remove(the_list, x):
if x in the_list:
del l[the_list.index(x)]
return the_list
l = remove(l, 4)
print(l)
Result:
[1, 2, 2, 3, 3, 3, 4]
Message permanent page
— What i need is things inside the remove
method