Sha256: 3b5c993ef452c04e2012cde11eece6628aac3785e9a9e5992bb02a05d7d823f2
Contents?: true
Size: 341 Bytes
Versions: 3
Compression:
Stored size: 341 Bytes
Contents
# Implements the K Combinator on the +:exec+ stack: # deletes the second item (replacing the top one). # class ExecKInstruction < Instruction def preconditions? needs :exec, 2 end def setup @keep = @context.pop(:exec) @discard = @context.pop(:exec) end def derive end def cleanup pushes :exec, @keep end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
nudge-0.2.9 | lib/instructions/exec/exec_k.rb |
nudge-0.2.8 | lib/instructions/exec/exec_k.rb |
nudge-0.2.7 | lib/instructions/exec/exec_k.rb |