Sha256: f54ec5458fc5d82cd8d05ce70f166ada3e12bd812e22e2f822d6062721ec2919
Contents?: true
Size: 251 Bytes
Versions: 1
Compression:
Stored size: 251 Bytes
Contents
#!/usr/bin/env ruby # frozen_string_literal: true require_relative "setup" require "ryo" point_x = Ryo(x: 5) point_y = Ryo({y: 10}, point_x) point = Ryo({ multiply: Ryo.fn { |m| [x * m, y * m] } }, point_y) p point.multiply.call(2) ## # [10, 20]
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ryo.rb-0.5.6 | share/ryo.rb/examples/1.1_prototypes_ryo_fn.rb |