Chestsheet -> Functions -> Lambda Function - error in third example (lexical closures)
m-zurowski opened this issue · 4 comments
m-zurowski commented
I wasn't sure why this code is written in such way, so I tried it on my pc and it doesn't work - the x is taken out of the blue :)
(I'm just learning, so I might be wrong)
wilfredinni commented
Jdubbbbb commented
Maciej:
First, question - where did you get the code!?
My hunch is —— You have to add at least two binary numbers of an arbitrary
length. N is a place holder to infinity. That’s my conclusion why it
doesn’t work.
Lambda is a lexical closure so it could be that instead.
Adder is always a function!
“Always keep learning, education is the fuel for life!” - Anonymous
Jessica
…On Wednesday, September 13, 2023, Maciej Żurowski ***@***.***> wrote:
[image: image]
<https://user-images.githubusercontent.com/111586186/267606112-d55a87ff-390f-40e9-8bf0-6382847c3b7e.png>
I wasn't sure why this code is written in such way, so I tried it on my pc
and it doesn't work - the x is taken out of the blue :)
(I'm just learning, so I might be wrong)
https://www.pythoncheatsheet.org/cheatsheet/functions <http://url>
—
Reply to this email directly, view it on GitHub
<#303>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AZ3EA6XOPQYMXWNFZ65KYPLX2F5AZANCNFSM6AAAAAA4WD5IU4>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
--
Jessica Weber
m-zurowski commented
Hey Guys,
Thanks for helping me understand it - looks like my brain had an issue with this one ;)
Screenshot was taken directly from pythoncheatsheet page.
m-zurowski commented
Problem was between the monitor and the chair, marking as resolved.