rbs icon indicating copy to clipboard operation
rbs copied to clipboard

Allow a block that accepts a block

Open mame opened this issue 4 years ago • 0 comments

This change allows a block to accept another block.

An (artificial) example is def foo: { { -> Integer } -> String } -> Float, which corresponds to the following Ruby code.

def foo(&blk)
  blk.call { 1 } + "foo"
  1.0
end

Soutaro says that this is actually used in TSort.

mame avatar Feb 18 '21 08:02 mame