Currying

Currying is when you break down a function that takes multiple arguments into a series of functions that each take only one argument.

Example

Ex1: Write a function that takes the product of all the integers on a given interval

Ex2: Write a function that takes the product of the factorials of all the integers  on a given interval

Ex3: Write a general function which generalizes both sum and product? 

 

You May Also Like

About the Author: Phuong Ta Thi Thao

Leave a Reply

avatar
  Subscribe  
Notify of