I do not understand the instructions of the exercice at all:
Define the function ±(value, error) to create a new instance of the Measurement type, and create some measurements.
what means 'instance' in this context?
is '±(value, error)' meant to be the name of the function? that seems very weird for me (a R suser) - shouldn't it be just a name without comma and spaces and unicode symboles? e.g. value _pm_error or so?
or is it supposed to describe what the function should do? shouldn't it be value +/- error then?
why does the solution ±(val, err) = Measurement(val, err)
use 'val' and 'err' instead of 'value' and 'error'? How does it understand it is the same? or is it that we currently give the value argument a value of 'va;' ? and the error argument a value equal to 'err' ?
I have not idea what the solution does ±(val, err) = Measurement(val, err) or how to use as a function
I can see m1 = 2.98 ± 0.43 creates Measurement(2.98, 0.43)
I guess what I needed to know is that ±(val, err) is equivalenet to writing val ± err ??
https://formal-methods-mpi.github.io/Workshop.jl/stable/3_types/exercise/
I do not understand the instructions of the exercice at all:
Define the function ±(value, error) to create a new instance of the Measurement type, and create some measurements.
why does the solution ±(val, err) = Measurement(val, err)
I can see m1 = 2.98 ± 0.43 creates Measurement(2.98, 0.43)
overall I'm quite confused with this exercice