Convert cells to Clojure types.
Sometimes lossy since some cells do not have equivalents in Clojure. For instance, addresses are converted to long. Recursive when it comes to collection.
Mainly useful for a deeper Clojure integration.
Convert cells to Clojure types. Sometimes lossy since some cells do not have equivalents in Clojure. For instance, addresses are converted to long. Recursive when it comes to collection. Mainly useful for a deeper Clojure integration.
(address address)
Returns the given address
as a JVM long.
Returns the given `address` as a JVM long.
(blob blob)
Returns the given blob
as a byte array.
Returns the given `blob` as a byte array.
(boolean boolean)
Returns the given boolean
cell as a JVM boolean.
Returns the given `boolean` cell as a JVM boolean.
(byte cell)
Returns the given byte
cell as a JVM long.
Returns the given `byte` cell as a JVM long.
(char char)
Returns the given char
cell as a JVM char.
Returns the given `char` cell as a JVM char.
(double double)
Returns the given double
cell as a JVM double.
Returns the given `double` cell as a JVM double.
Generic function for converting a cell to a Clojure representation.
Relies all other functions from this namespace.
(any (convex.cell/* {:a [:b]}))
Generic function for converting a cell to a Clojure representation. Relies all other functions from this namespace. ```clojure (any (convex.cell/* {:a [:b]})) ```
(any cell)
(keyword keyword)
Returns the given keyword
cell as a Clojure keyword.
Returns the given `keyword` cell as a Clojure keyword.
(list list)
Returns the given list
cell as a Clojure list.
Returns the given `list` cell as a Clojure list.
(long long)
Returns the given long
cell as a JVM long.
Returns the given `long` cell as a JVM long.
(map map)
Returns the given map
cell (hash map or blob map) as a Clojure map.
Attention, in Clojure maps, sequential types containg the same items are equivalent but not in Convex. Hence, a clash could happen in the rare case where different sequential types are used as keys. For instance, the following is possible in Convex but not in Clojure (would complain about duplicate keys:
{[:a] :foo
'(:a) :foo}
Returns the given `map` cell (hash map or blob map) as a Clojure map. Attention, in Clojure maps, sequential types containg the same items are equivalent but not in Convex. Hence, a clash could happen in the rare case where different sequential types are used as keys. For instance, the following is possible in Convex but not in Clojure (would complain about duplicate keys: ```clojure {[:a] :foo '(:a) :foo} ```
(set set)
Returns the given set
cell as a Clojure set.
Same comment about sequential types as in map
applies here.
Returns the given `set` cell as a Clojure set. Same comment about sequential types as in [[map]] applies here.
(string string)
Returns the given string
cell as a JVM string.
Returns the given `string` cell as a JVM string.
(symbol symbol)
Returns the given symbol
cell as a Clojure symbol.
Returns the given `symbol` cell as a Clojure symbol.
(syntax syntax)
Returns the given syntax
cell as a Clojure map such as:
Key | Value |
---|---|
:meta | Clojure map of metadata |
:value | Value wrapped, converted as well |
Returns the given `syntax` cell as a Clojure map such as: | Key | Value | |---|---| | `:meta` | Clojure map of metadata | | `:value` | Value wrapped, converted as well |
(vector vector)
Returns the given vector
cell as a Clojure vector.
Returns the given `vector` cell as a Clojure vector.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close