l4u/l4u_obj

Types

L4uobj is a type that can operate an object that keeps the condition like the so called object oriented language.

pub type L4uObj {
  L4uObj(
    name: String,
    pid: Pid,
    get_env: fn() -> Env,
    eval: fn(List(Expr)) -> Result(Expr, String),
    read: fn(String) -> Result(List(Expr), String),
    print: fn(Expr) -> String,
  )
}

Constructors

  • L4uObj(
      name: String,
      pid: Pid,
      get_env: fn() -> Env,
      eval: fn(List(Expr)) -> Result(Expr, String),
      read: fn(String) -> Result(List(Expr), String),
      print: fn(Expr) -> String,
    )

    Arguments

    • name

      Name of this L4uObj.

    • pid

      PID of the process where EVAL is executed.

    • get_env

      Get the current environment of the L4uObj.

    • eval

      Evaluate the given list of s-expressions in the environment

    • read

      Read the given string and return the list of s-expressions.

    • print

      Print the given s-expression and return the string representation.

Functions

pub fn generate_new_l4u_obj(
  name: String,
  initializer: fn() -> Env,
) -> L4uObj
pub fn process_get_env(pid: Pid) -> Env

Name of this L4uObj. PID of the process where EVAL is executed. Get the current environment of the L4uObj. Evaluate the given list of s-expressions in the environment Read the given string and return the list of s-expressions. Print the given s-expression and return the string representation.

Search Document