Codebase list ohcount / 85104d5a-b71d-4620-9315-33d4daf34104/main test / src_dir / standard_crystal.cr
85104d5a-b71d-4620-9315-33d4daf34104/main

Tree @85104d5a-b71d-4620-9315-33d4daf34104/main (Download .tar.gz)

standard_crystal.cr @85104d5a-b71d-4620-9315-33d4daf34104/mainraw · history · blame

#comment
  # comment with "string"

class Rest
  def one
    two do |c|
      puts c
    end
  end

  def two(&block : Int32 -> _)
    three { |x| yield x }       # yield is faster than passing blocks.
  end

  def three
    yield 3
  end
end

Rest.new.one