CSC 104 weekly Discussion week 7

Hello! Welcome to my CSC 104 weekly discussion! 

Today I want to talk something about I learned this week, "Local Function".

Lets look at the original function:

(define (a some-settings)
  (local [define b ......
                .......     ]
    (the function that can use a and b together )))


So this function can understand us to run the local first, then run the remaining function.

If we don't have the local function, what will we do?

We need to define the function ahead and then run the remaining function, which will cause some issues and space for the program. Since local function only will be defined inside the function, it will not influence other functions, which is essential and useful all the time.

For a lot of my classmate, they do not understand the concept of the local function, but my strategy is that to understand what we need first (the input of the function) and then design the remaining function. Sometimes I also found drawing an arrow graph is helpful. 

Comments

Popular posts from this blog

CSC 104 weekly discussion week 10

CSC 104 weekly discussion week 8

CSC 104 weekly discussion week 11,12