Skip to content

Replaced Clojure Functions

A number of standard functions from Clojure's standard library clojure::core have been replaced by functions in the ys::std library. In general the replacements have the same intent as the original functions, but from a YS perspective.

When you absolutely need the original Clojure functions, they are available in this ys::clj library. These functions are automatically available in YAMLSCript by using the clj/ prefix.

Functions🔗

The documentation for these functions is available in the Clojure documentation web site, so we include a link to there in each definition.

  • clj/compileIn Clojure  External link the compile function compiles a namespace into a set of class files. In YS it converts a YS source code string into a Clojure source code string.

  • clj/loadIn Clojure  External link the load function loads a file from the classpath. In YS it's an alias for load-file(below).

  • clj/load-fileIn Clojure  External link the load-file function loads a Clojure file from a given file path. In YS it loads a YS file from a given file path.

  • clj/numIn Clojure  External link the num function converts a Java number to a Clojure number. In YS it converts a numeric string to a number.

  • clj/useIn Clojure  External link the use function is used to refer a namespace into the current namespace. In YS it loads a YS or Clojure library from YSPATH.