Skip to content
This repository has been archived by the owner on Dec 26, 2024. It is now read-only.

Commit

Permalink
documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
prasincs committed May 9, 2011
1 parent 5e677bc commit 7a34ea0
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions src/thor/node.clj
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,27 @@

;
(def INFINITY (Integer/MAX_VALUE))
(defstruct pos :x :y )
(defstruct mem :total :free)
(defstruct data :size :content)

(defn create-data [size content]
(defstruct pos
"Position variable contains {:x :y }"
:x :y )
(defstruct mem
"Memory definition {:total :free}"
:total :free)
(defstruct data
"Data type {:size :content}"
:size :content)

(defn create-data
"Create data of certain size and content"
[size content]
(struct-map data :size size :content content))

(defn create-memory [size]
(struct-map mem :total size :free size))


(defrecord Node
"Node data structure"
[id
name
memory
Expand Down

0 comments on commit 7a34ea0

Please sign in to comment.