# Lesson XVI Change the ink while the brush is still. See what remains. Then the line can be trusted. ## Try ```prolog % ?- E = kernel, % run(E, [push(real(2.5)), push(int(1)), cast(real), add], [], Stack). % Stack = [real(3.5)]. % ?- E = kernel, % run(E, [push(real(2.9)), cast(int)], [], Stack). % Stack = [int(2)]. % ?- E = kernel, % infer(E, [cast(real), add], Scheme). % Scheme = scheme([], effect([int, real|S], [real|S])). ``` ## Lesson ```prolog word(kernel, cast(real), [A::int|S] -- [B::real|S], [], B is float(A)). word(kernel, cast(real), [A::real|S] -- [A::real|S], [], true). word(kernel, cast(int), [A::real|S] -- [B::int|S], [], B is truncate(A)). word(kernel, cast(int), [A::int|S] -- [A::int|S], [], true). ```