Module: Iode

Defined in:
lib/iode/core.rb,
lib/iode.rb,
lib/iode/macro.rb,
lib/iode/scope.rb,
lib/iode/lambda.rb,
lib/iode/reader.rb,
lib/iode/version.rb,
lib/iode/core/math.rb,
lib/iode/core/lists.rb,
lib/iode/core/output.rb,
lib/iode/interpreter.rb,
lib/iode/core/strings.rb,
lib/iode/core/comparisons.rb

Overview

iode: core/lists.rb

Copyright 2014 Chris Corbyn <[email protected]>

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Defined Under Namespace

Modules: Core Classes: Interpreter, Lambda, Macro, Reader, Scope

Constant Summary collapse

VERSION =
"0.0.4"

Class Method Summary collapse

Class Method Details

.run(source) ⇒ Object

Run a string of iode source code and return a value to Ruby.

Parameters:

  • source (String)

    iode source code

Returns:

  • (Object)

    the return value of the program



38
39
40
# File 'lib/iode.rb', line 38

def run(source)
  Interpreter.new.eval(Reader.new.read(source))
end