diff --git a/carp_spike/.gitignore b/carp_spike/.gitignore deleted file mode 100644 index 466e248..0000000 --- a/carp_spike/.gitignore +++ /dev/null @@ -1 +0,0 @@ -out/ \ No newline at end of file diff --git a/carp_spike/main.carp b/carp_spike/main.carp deleted file mode 100644 index 344241e..0000000 --- a/carp_spike/main.carp +++ /dev/null @@ -1,10 +0,0 @@ -(use Random) -(Project.config "title" "gemla") - -(deftype SimulationNode [population-size Int, population-cutoff Int]) - -;; (let [test (SimulationNode.init 10 3)] -;; (do -;; (SimulationNode.set-population-size test 20) -;; (SimulationNode.population-size &test) -;; )) \ No newline at end of file diff --git a/sbcl_spike/.gitignore b/sbcl_spike/.gitignore deleted file mode 100644 index e69de29..0000000 diff --git a/sbcl_spike/main.lisp b/sbcl_spike/main.lisp deleted file mode 100644 index cf6e008..0000000 --- a/sbcl_spike/main.lisp +++ /dev/null @@ -1,12 +0,0 @@ -;; Define a type that contains a population size and a population cutoff -(defclass simulation-node () ((population-size :initarg :population-size :accessor population-size) - (population-cutoff :initarg :population-cutoff :accessor population-cutoff) - (population :initform () :accessor population))) - -;; Define a method that initializes population-size number of children in a population each with a random value -(defmethod initialize-instance :after ((node simulation-node) &key) - (setf (population node) (make-list (population-size node) :initial-element (random 100)))) - -(let ((node (make-instance 'simulation-node :population-size 100 :population-cutoff 10))) - (print (population-size node)) - (population node)) \ No newline at end of file