Sha256: 18aba2fef768a55ea34cb8f6ef4dd4774d50cb100ecfa4c17e5a4160401bbaea

Contents?: true

Size: 302 Bytes

Versions: 2

Compression:

Stored size: 302 Bytes

Contents

(define set!
  (native_function "
    Proc.new() do |arguments, interpreter|
      if( interpreter.current_environment.find(arguments[0]) == nil)
        raise 'Cannot set unbound variable ' + arguments[0]
      end
      interpreter.current_environment.define(arguments[0], arguments[1])
    end
  "))

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
flea-0.1.1 lib/flea/standard_library/set.scm
flea-0.1.0 lib/flea/standard_library/set.scm