anchor.diff:      let eng = new Orelang.Engine()
       match Orelang.ParseFromString source with
       | None -> Console.WriteLine("failed to parse sources")
  -    | Some ast -> 
  +    | Some ast ->
           match eng.Evaluate ast with
  -        | Some value -> Console.WriteLine("computational result = {0}", value)
  +        | Some(Orelang.Expr.Value v) -> Console.WriteLine("computational result = {0}", v)
  +        | Some value -> Console.WriteLine("computation was finished but the result isn't available.")
           | None -> Console.WriteLine("failed to complete evaluation.")
       0
  
positive.code: open System.Text.RegularExpressions
  open FSharp.Data
  
  module Orelang = 
      type Expr = JsonValue
      
      let re_replace (p : string) (r : string) (i : string) : string = Regex.Replace(i, p, r)
      
      let ParseFromString(s : string) : Expr option = 
          s
          |> (re_replace ";.*" "")
          |> (re_replace @"\(\s*" "[")
  
negative.code:         |> (re_replace @"[+*=](?=[, \]])" "\"$0\"")
          |> (re_replace "[a-zA-Z_][a-zA-Z0-9_]*" "\"$0\"")
          |> JsonValue.Parse
          |> exprFromJson
  
      type Engine() =
          let mutable env = Dictionary<string, Expr>()
  
          member private this.getValue (k : string) =
              match env.TryGetValue(k) with
              | (true, v) -> Some v
              | _ -> None
  
          member private this.setValue (k : string) (v : Expr) =
              if env.ContainsKey(k) then env.Remove(k) |> ignore
              env.Add(k, v)
  
          member private this.substitute (expr : Expr) : Expr option =
              match expr with
              | Expr.Command _ ->
                  match this.Evaluate expr with
                  | Some(Expr.Value v) -> Some(Expr.Value v)
                  | _ -> None
              | Expr.Value v -> Some(Expr.Value v)
              | _ -> None
  
          member this.Evaluate(expr : Expr) =
              match expr with
              | Expr.Command(symbol, []) -> this.getValue symbol
              | Expr.Command("step", lines) -> this.evalStep lines
              | Expr.Command("until", [ e0; e1 ]) -> this.evalUntil e0 e1
              | Expr.Command("set", [ Expr.String k; v ]) ->
                  this.substitute v |> Option.map (fun v ->
                                           this.setValue k v
                                           Expr.Nil)
              | Expr.Command("=", [ lhs; rhs ]) -> this.evalCmp (=) lhs rhs
              | Expr.Command("+", [ lhs; rhs ]) -> this.evalBinOp (+) lhs rhs
              | _ -> None
  
          member private this.evalStep lines =
              let rec eval_step lines =
                  let ret = this.Evaluate(List.head lines)
                  match (List.tail lines) with
                  | [] -> ret
                  | tl -> eval_step tl
              eval_step lines
  
          member private this.evalUntil pred expr =
              let rec eval_until e0 e1 =
                  match this.Evaluate e0 with
                  | Some(Expr.Bool true) -> Some Expr.Nil
                  | _ ->
                      this.Evaluate e1 |> ignore
                      eval_until e0 e1
              eval_until pred expr
  
          member private this.evalCmp op lhs rhs =
              match (this.substitute lhs, this.substitute rhs) with
              | (Some(Expr.Value l), Some(Expr.Value r)) -> Some(Expr.Bool(op l r))
              | _ -> None
  
          member private this.evalBinOp op lhs rhs =
              match (this.substitute lhs, this.substitute rhs) with
              | (Some(Expr.Value l), Some(Expr.Value r)) -> Some(Expr.Value(op l r))
              | _ -> None
  
  [<EntryPoint>]
  let main _ =
      let source = """
    (step
      (set i 10)
  