4 ms·
it calls the method drawImage on the context object. ignore, in OCaml, allows to "cast the expression to void"
by manu3000 9y ago
it calls the method drawImage on the context object.
ignore, in OCaml, allows to "cast the expression to void"
- LeonidasXIV 9y agoCasting is a bit of a wrong term here, since that's not at all what happens. `ignore` is just a function that takes any argument and returns `()` (unit). That's useful because sometimes you want to throw away the result of the computation (usually a side effect), so you can just call `ignore` on it and get a `()` value out.