Functional programming | Sololearn: Learn to code for FREE!

0

Functional programming

Can somebody please explain me what functional proframming is and what pure and unpure functions are. I have learned them on Sololearn now, but I can't understand them, I have no idea at all about them. Can somebody please explain me what they are, with example? Thank you

5/23/2022 10:07:06 AM

Danish Zubair

10 Answers

New Answer

+4

https://code.sololearn.com/cH2EEuu1ynqK/?ref=app

+2

Rik Wittkopp Thank you so much for your examples. Very helpful.

+1

first of all , Python is not a functional programming language, but it is a multi-paradigm language that makes functional programming easy to perform, and easy to mix with other programming styles and Your function is pure if it does not contain any external code. Otherwise, it is impure if it includes one or more side effects. I'm sorry i don't provide you right now here an examples. wait for others reply may be someone can provide a brief explanation with example too.

+1

Davinder Kumar ok, thank you

+1

Rik Wittkopp thank you soo much

+1

Danish Zubair You're welcome πŸ˜πŸ‘

+1

Rik Wittkopp thank you soo much

0

Here is an example. https://www.sololearn.com/Discuss/1836320/?ref=app

0

https://code.sololearn.com/c08UeWpKv21r/?ref=app

0

Stefanoo thank you