Module: Church::Kernel

Defined in:
lib/church/kernel.rb

Constant Summary collapse

KERNEL =

Our reference to the Kernel constant

('ancestors' >> ('class' >> []
GETS =

Reads and returns a single line from standard input.

-> { 'gets' >> KERNEL }
INTERACT =

Reads lines from standard input and prints their results after being passed to fn, terminating on EOF.

-> &fn {
  line = GETS[]
  line ? 0 : ('exit' >> KERNEL)
  line = 'chomp' >> line
  PUTS[fn[line]]
  INTERACT[&fn]
}