to_nil is actually a pretty important function! Completely trivial, obviously, but it demonstrates that there's a canonical way to map every value in Ruby to nil. This is essentially the defining feature of nil, in a sense.
With typing the interest here would be more clear, of course, since it would be more apparent that nil inhabits every type.
With typing the interest here would be more clear, of course, since it would be more apparent that nil inhabits every type.