plushi.utils
Utility functions for use within plushi.
coerce-to-char
(coerce-to-char x)
Attempts to coerce x to a character. If not possible, throws error.
ensure-list
(ensure-list x)
Ensures the x is a list. Converts other collections to a list. Otherwise
creates a list with x in it. Realizes x if x is a lazy sequence.
ensure-set
(ensure-set x)
Ensures the x is a set. Converts other collections to a set. Otherwise
creates a set with x in it.
ensure-vector
(ensure-vector x)
Ensures the x is a vector. Converts other collections to a vector. Otherwise
creates a vector with x in it.
keyword-to-str
(keyword-to-str keyword)
Converts a keyword to a string without the colon.
round-float
(round-float value decimal-places)
Rounds the float value to given number of decimal places
vector-to-list
(vector-to-list v)
Converts a vector into a list preserving the order.