std.lib.result

->result

added in 3.0

(->result key data)

converts data into a result

(->result :hello 1 2 3) ;;#result.return{:data 1 2 3, :key :hello} => std.lib.result.Result

result

added in 3.0

(result m)

creates a result used for printing

(result {:status :warn :data 1 2 3 4}) ;; #result{:status :warn, :data 1 2 3 4} => std.lib.result.Result

result-data

added in 3.0

(result-data res)

accesses the data held by the result

(result-data 1) => 1

(result-data (result {:status :warn :data 1 2 3 4})) => 1 2 3 4

result?

added in 3.0

(result? obj)

checks if an object is a result

(-> (result {:status :warn :data 1 2 3 4}) result?) => true