Spell correction

This commit is contained in:
Isaac Shoebottom 2022-09-27 18:11:08 -03:00
parent a2aac5931b
commit 92b4975393
3 changed files with 5 additions and 5 deletions

View File

@ -9,7 +9,7 @@ Git grep was useful in finding any file with the given content I am looking for
Git status was useful in showing the status of my changes, and the added and untracked files.
I also used `raco frog --clean` to keep my git repository clean before commiting.
I also used `raco frog --clean` to keep my git repository clean before committing.
Git log showed me the history of my project's commits, which was useful in reminding myself what I had done the previous lab
@ -23,7 +23,7 @@ In DrRacket, I used the circle function (`(circle 10)`), the rectangle function
I learned how to define names for a specific function call, like saving the function `(circle 10)` as variable `c`. Appending the output of defined functions also works. For example `(hc-append c c)` would print `(circle 10)` twice.
You can also use this functionality to define functions, for example, give your define statement an argument and you can use that within the rest of the define statement. This is best examplained by showing that `(define (square n) (filled-rectangle n n))` will define a square by using the pre-existing filled rectangle function.
You can also use this functionality to define functions, for example, give your define statement an argument and you can use that within the rest of the define statement. This is best explained by showing that `(define (square n) (filled-rectangle n n))` will define a square by using the pre-existing filled rectangle function.
In racket you can create what are known as "local bindings" which are functions that are local (belong to) a parent function. You can define these individually with another define function, or to define them by using `let` or `let*`, with the latter letting later bindings use earlier bindings. Both of them let you define more than one binding at once.

View File

@ -15,6 +15,6 @@ I had great difficulty in getting the rainbow code to work. I ended up with a wo
(color-mapper gr-obj (rest color-list)))]))
(color-mapper p (list "red" "orange" "yellow" "green" "blue" "purple")))
```
This deines a function called rainbow 2, which then defines another function called color mapper. color mapper checks if there is an empty list, and if so, ends. If there is not an empty list, it calls the colorize function with the first item in the list, with the passed in graphical object. If then recursivly does this until the list is empty, since each recursive call removes an item from the start of the list. In the end you get a set of colored objects in the order of the function call at the end of the definition of rainbow 2.
This defines a function called rainbow 2, which then defines another function called color mapper. color mapper checks if there is an empty list, and if so, ends. If there is not an empty list, it calls the colorize function with the first item in the list, with the passed in graphical object. If then recursively does this until the list is empty, since each recursive call removes an item from the start of the list. In the end you get a set of colored objects in the order of the function call at the end of the definition of rainbow 2.
## Conclusion
I did not do much of the lab as assigned, because of my difficulty in making the program. My understanding of how my program works after getting it working will help me in getting future labs done on time

View File

@ -11,7 +11,7 @@ You can pass functions as values into other functions which can then be used ins
In racket I implemented a factorial function with recursion, and then tested the function to assure that the function is performing correctly.
## Scribble Demo
I learned how you can use Scribble to use racket in a web page, to programatically generate web content.
I learned how you can use Scribble to use racket in a web page, to programmatically generate web content.
## Modules
I leanned about how to make modules, submodules, testing modules, and a main module. This was shown in a simple program that defined and exported one function called `hello` which simply printed "Hello!" I then used it in another application by using the `require` keyword. I then defined a main module that says when a the hello module is loaded it should print "Hello!"
I learned about how to make modules, submodules, testing modules, and a main module. This was shown in a simple program that defined and exported one function called `hello` which simply printed "Hello!" I then used it in another application by using the `require` keyword. I then defined a main module that says when a the hello module is loaded it should print "Hello!"