Class: Nydp::Builtin::SetIntersection

Inherits:
Object
  • Object
show all
Includes:
Base, Singleton
Defined in:
lib/nydp/builtin/set_intersection.rb

Instance Method Summary collapse

Methods included from Base

#builtin_invoke_1, #handle_error, #inspect, #invoke, #invoke_1, #invoke_2, #invoke_3, #invoke_4, #name, #nydp_type, #to_s

Methods included from Helper

#cons, #list, #literal?, #pair?, #sig, #sym, #sym?

Methods included from Converter

#n2r, #r2n

Instance Method Details

#builtin_invoke(vm, args) ⇒ Object



7
# File 'lib/nydp/builtin/set_intersection.rb', line 7

def builtin_invoke      vm, args ; vm.push_arg args.reduce &:& ; end

#builtin_invoke_2(vm, a) ⇒ Object



4
# File 'lib/nydp/builtin/set_intersection.rb', line 4

def builtin_invoke_2       vm, a ; vm.push_arg a               ; end

#builtin_invoke_3(vm, a, b) ⇒ Object



5
# File 'lib/nydp/builtin/set_intersection.rb', line 5

def builtin_invoke_3    vm, a, b ; vm.push_arg(a & b)          ; end

#builtin_invoke_4(vm, a, b, c) ⇒ Object



6
# File 'lib/nydp/builtin/set_intersection.rb', line 6

def builtin_invoke_4 vm, a, b, c ; vm.push_arg(a & b & c)      ; end