Ruby
https://gyazo.com/5a8b38b8d8137be9a5a76959bf6c1fd4
code:ruby
class Container
def initialize
@c = {}
@fac = {}
yield self
end
def [] k
@ck || (@fack && @fack.call(self)) end
def []= k, v
end
def factory k, &b
end
end
instance_eval
define_singleton_method
method_missing
TracePoint
code:ruby
module Maybe
def self.fmap f, v; v == nil ? nil : f.call(v); end
def self.apply f, v; f == nil ? nil : fmap(f, v); end
def self.pure v; v; end
def self.return v; v; end
def self.bind v, f; v == nil ? nil : f.call(v); end
end