Sha256: 2dfe752ca3024676ef6037ae65df23839b4e3e2e4310aea5f5cfbeade968f941
Contents?: true
Size: 286 Bytes
Versions: 18
Compression:
Stored size: 286 Bytes
Contents
require_relative '../function' Dentaku::AST::Function.register(:switch, :logical, lambda { |*args| value = args.shift default = args.pop if args.size.odd? match = args.find_index.each_with_index { |arg, index| index.even? && arg == value } match ? args[match + 1] : default })
Version data entries
18 entries across 18 versions & 2 rubygems