Pyli/Methods/Language

From Jonathan Gardner's Tech Wiki
< Pyli‎ | Methods
Jump to: navigation, search

Core Language

  • (eval expr): Given an expression, evaluate it.
  • (apply fn vector): Given a vector of (fn (args)), evaluate fn with (args). eval calls apply when it sees a vector.
  • (parse string): Given a string, parse out the program. This is a vector of expressions.
  • (compile prog): Given a vector, reduce it to its simplest and fastest executable. This can also be passed to eval. (TODO)
  • (apply-args args values): Returns a new vector of pairs, with the args described by args applied with the values described by values. Used by apply.