Slide 8
Slide 8 text
def halt?(program, data)
# 真に驚くべき実装を発見したが、
# ここに記すには余白が狭すぎる
[true, false].sample
end
def self_check(program)
result = halt?(program, program)
puts "The result of 'halt?' is #{result}"
if result
while true
puts "Never halting!!"
end
else
puts "Just halting"
end
end
self_check($stdin)
ϓϩάϥϜ
શମ૾