Sha256: 0fa5cc1bb31c42b12dda9ada8405d58512bd4035a39e28dc8bae9af5e75dc343
Contents?: true
Size: 401 Bytes
Versions: 18
Compression:
Stored size: 401 Bytes
Contents
def tuple_set ary = [:a, :b, :c] ary[-1] = :z ary end def tuple_get ary = [:a, :b, :c] ary[-1] end def seq_set ary = [:a, :b, :c] + [] ary[-1] = :z ary end def seq_get ary = [:a, :b, :c] + [] ary[-1] end __END__ # Classes class Object def tuple_set : -> [:a, :b, :z] def tuple_get : -> :c def seq_set : -> (Array[:a | :b | :c | :z]) def seq_get : -> (:a | :b | :c) end
Version data entries
18 entries across 18 versions & 1 rubygems