(ns isla.library
  (:use [clojure.pprint])
  (:require [clojure.string :as str])
  (:require [isla.utils :as utils]))

(defn get-initial-env []
  {
   :ret nil
   :ctx {
         "write" (fn [env str]
                   (utils/output str) ;; print out
                   str) ;; add to context
    }
  })
(ns isla.library
  (:use [clojure.pprint])
  (:require [clojure.string :as str])
  (:require [isla.user :as user])
  (:require [isla.utils :as utils]))

(defn get-initial-env [& args]
  (def extra-types (first args))
  {
   :ret nil
   :ctx {
         "write" (fn [env str]
                   (utils/output str) ;; print out
                   str) ;; add to context
         }
   :types (if (nil? extra-types)
            user/types
            (merge extra-types user/types))
  })
Allow addition of defrecords to Isla env.
Allow addition of defrecords to Isla env.

* These define 'types' that may be instantiated with `thing is a thingy`.
* This instantiation creates the record for that type (which has slots and maybe methods).
maryrosecook/islaclj