Skip to content

Instantly share code, notes, and snippets.

@hiredman
Created June 4, 2018 22:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hiredman/2959758c99f0e332f585d3cfe51672a7 to your computer and use it in GitHub Desktop.
Save hiredman/2959758c99f0e332f585d3cfe51672a7 to your computer and use it in GitHub Desktop.
(defn optionFourWorkOut []
(println "Enter user name")
(let [use-input (read-line)
user-name-id (first
(for [x (range @customer-size)
:while (= (compare user-input (get (get customer-list x) 1)) 0)]
(get (get customer-list x) 0)))
user-product-id-and-quantity (vec (for [y (range @sales-size)
:while (= (compare user-name-id (get (get sales-list y) 1)) 0)]
[(get (get sales-list y) 2) (get (get sales-list y) 3)]))
arr (vec
(for [z (range @product-size)
:while (compare (get (get user-product-id-and-quantity z) 0) (get (get product-list z) 0)) 0]
[(get (get product-list z) 2)]))]
;; do whatever with values here
))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment