Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Functional Python The Lambda Lambada Currying

How does this relate to promises?

Kenneth Love ,

This seemed to be a hard lesson to apply to practical python, but a lot of the concepts seem to resemble something I've tried to understand in javascript: Promises and creating the idea of eventuality in programming. The lambda with local variables seems to look an awful lot like an unfulfilled promise passed to the next function in a chain in javascript. Is this the same pattern of programming, and do you know where I could find information on applying these skills to my javascript?

Nicolas

1 Answer

Kenneth Love
STAFF
Kenneth Love
Treehouse Guest Teacher

From what I understand (and, sorry for the late reply, been too busy lately to get to browse the forums much), currying and promises aren't related at all. A curried function is "complete" but can't actually be calculated. A promise, though, is complete and calculable, just hasn't been run yet.

Lambdas in Python are JavaScript's anonymous functions (i.e. all functions in JavaScript that aren't explicitly given a name).

Ah, ok. Thanks for getting back to me at all Kenneth, it's always appreciated.