Posted By

xenonite on 09/26/08


table boolean

Versions (?)

Who likes this?

1 person have marked this snippet as a favorite


Boolean table

 / Published in: Ruby

prints the result of a boolean function evaluated in the block. 3 variables.

  1. def btab3()
  2. 2.times{|a| 2.times{|b| 2.times{|c|
  3. puts "#{a} #{b} #{c} | #{ yield([a,b,c])}"
  4. }}}
  5. end

Report this snippet  

You need to login to post a comment.