3 ms·
I like using .then for chaining stuff, like this: sig { params(obj: T.untyped).void } def write(obj) obj .then { Array(_1) } .the
by quechimba 4y ago
I like using .then for chaining stuff, like this:
sig { params(obj: T.untyped).void }
def write(obj)
obj
.then { Array(_1) }
.then { @wrapper.pack(_1) }
.then { @deflate.deflate(_1, Zlib::SYNC_FLUSH) }
.then { @body.write(_1) }
end