I am new with Functional Programmin and Clojure, so I am not really sure
about what to do.
Instead of connecting to a database, can I do this?
1 - define initial data, like a matrix of Refs
1 - generate random operations to execute: [ random-account-source-id(0,
N_MAX) , random-account-destination-id(0, N_MAX), random-money (0, 1000) ]
2 - insertion in the matrix
3 - Sync transfer of money from source-id to destination-id for all the
insertions in the matrix like:
for i=0; i<N, i++
transfer (matrix[i].source,matrix[i].dest,matrix[i].money)
..don't know, maybe:
(defn do-all[]
(dosync
(when (pos? N)
(transfer (get matrix [pos 1], get matrix [pos 2], get matrix [pos
3])))))
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en