Name: Anonymous 2008-08-19 15:18
class SExp
def initialize &block
yield
end
end
SExp.new {
puts "IM IN A BLOCK"
puts "IM LEAVING THIS BLOCK"
puts "PEACE OUT!"
SExp.new {
puts "IM IN A NEW BLOCK NOW!"
SExp.new {
puts "IT'S JUST LIKE THE ALGORITHMIC LANGUAGE SCHEME"
SExp.new {
puts "HMA MEME FAN"
}
}
}
}It allows you to write your programs in Ruby just as if you were writing them in a SEXP based language like LISP or Scheme.
What do you guys think, will this be useful?