Clojure Passing List Variables

I am trying to pass a list of variables into a function individually however when i try to pass them the function returns nill.

(map (partial shortestPath G) (first Robot)(second Robot))

I tested the bits of code individually and (first Robot) and (second Robot) don't work as i intended them too they currently return and output like so[[:space]].

What i need them to return is just :Space. How would i go about doing this?



(def ItemPickUp [:Space :Mail])
(def ItemDestinations [:Storage :z2])
(def Robot [[ItemPickUp] [ItemDestinations]])
(map (partial shortestPath G) (first Robot)(second Robot))


I managed to solve the problem i needed to use flatten like so

(map (partial shortestPath G) (flatten (first Robot))(flatten(second Robot)))

giving me the desired output

(flatten (first Robot))
(:Mail :d2)

Need Your Help

Calling C DLL from Visual Basic 6: Double data type not working

c dll vb6 double user-defined-types

I'm passing a simple user-defined type (UDT) from Visual Basic 6 to a C DLL. It works fine, except for the double data type, which shows up as 0.

How to create JSF form with AJAX data validation

java jsf jsf-2

I'm working on a JSF form prototype for inserting data into database table using AJAX data validation This is the JSF page: