Varible red overrides function in hw1.jl
goalaleo opened this issue · 1 comments
goalaleo commented
For week 1 in Exercise 2.3 the student is required to write a function to quantize instances of subtypes of AbstractRGB
e.g. RGB
. The live docs imply that the functions red(c)
green(c)
and blue(c)
can be used to "pull out" the RGB values from a pixel.
However, the function red(c)
is overwritten by a later variable assignment to red
on L301
This causes an error to be displayed if the student assumes that red
is a function, and tries to call it
Commenting out the variable assignment reverts the function override
I suggest that the variable red
should be renamed to something like color_red
to avoid overriding the function
fonsp commented